VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: ManosPaps on May 03, 2019, 17:20:28 PM

Title: Questions regarding Invoices, Delivery Notes
Post by: ManosPaps on May 03, 2019, 17:20:28 PM
(https://i.ibb.co/N18PkFf/tax-Wrong-Place.jpg)

Thanks for your support
[/list]

Title: Re: Questions regarding Invoices, Delivery Notes
Post by: GJC Web Design on May 04, 2019, 10:31:00 AM
emails and invoices are all override-able in the template

they are constructed by the templates in  components\com_virtuemart\views\invoice\tmpl\

copy them to  templates\YOUR_TEMPLTE\html\com_virtuemart\invoice\  and you can produce any conceivable layout

Title: Re: Questions regarding Invoices, Delivery Notes
Post by: Studio 42 on May 04, 2019, 13:20:19 PM
You can set another (new) statut for "READYTOPICKUP"
In the config, you can set statut to send email(or not), so it should solve this problem
Title: Re: Questions regarding Invoices, Delivery Notes
Post by: ManosPaps on May 04, 2019, 16:50:43 PM
Thank you for your answers.
I ve copied/pasted the files into the template/ path and managed to do some minor changes.
I 've also created the new status code.
It would be great if you could answer me the question regarding "Send different emails for each status".
Is there an external plugin for it?
Title: Re: Questions regarding Invoices, Delivery Notes
Post by: Jörgen on May 04, 2019, 18:34:43 PM
Easiest solution, check status in beginning of mejl template, include the email sublayout you need.

Jörgen @ Kreativ Fotografi
Title: Re: Questions regarding Invoices, Delivery Notes
Post by: Studio 42 on May 04, 2019, 19:33:37 PM
Quote from: ManosPaps on May 04, 2019, 16:50:43 PM
It would be great if you could answer me the question regarding "Send different emails for each status".
Is there an external plugin for it?
I dont think. I wrote e trustpilot plugin to send emails to trustpilot. I can perhaps modify it to send an "extra" email to other email per statut.
In this case, the standard email is send and you can send another email to another email address.
Title: Re: Questions regarding Invoices, Delivery Notes
Post by: GJC Web Design on May 04, 2019, 19:56:59 PM
something like 

make your new subtemplates

e.g.

\templates\gjc_j3_v6\html\com_virtuemart\invoice\mail_html_shopperstatus1.php etc or just do it with lang constants



if($this->orderstatuses[$this->orderDetails['details']['BT']->order_status] == 'P') {
       echo $this->loadTemplate('shopperstatus1');
}else.......

etc
Title: Re: Questions regarding Invoices, Delivery Notes
Post by: ManosPaps on May 06, 2019, 12:05:21 PM
Quote from: GJC Web Design on May 04, 2019, 19:56:59 PM
something like 

make your new subtemplates

e.g.

\templates\gjc_j3_v6\html\com_virtuemart\invoice\mail_html_shopperstatus1.php etc or just do it with lang constants



if($this->orderstatuses[$this->orderDetails['details']['BT']->order_status] == 'P') {
       echo $this->loadTemplate('shopperstatus1');
}else.......

etc

perfect! Thank you alot!

Due to the poor pdf rendering, i ve removed attachment of pdf invoice which is sent by mail and plan to use a html version of the invoice.
So what i thought is to send invoice when order_status is set to Complete.

I should be able to obtain anytime a copy of the invoice. So after searching in the forum i managed to do the following changes:
In virtuemart-> orders i ve modified the invoice link so i get it in html version:

I changed the link of "create invoice" by removing "format=pdf" and modifying "layout=mail" of this link
"index.php?option=com_virtuemart&view=orders&task=callInvoiceView&tmpl=component&virtuemart_order_id=11&layout=invoice&format=pdf&d=17&invoiceNumber=190505S3TR011"
and then i do get an html succesfully.

Do you see any drawbacks in this approach?

I m trying to do the same now with deliveryNote to get it in html with the css , but i can t get it correctly. I assume its because there isn't a mail template for it? Is there an easy workaround ?

Edit: ok i think i was a bit too fast. Thats just the mail template, and not the invoice converted to mail template as i thought. :(


Title: Re: Questions regarding Invoices, Delivery Notes
Post by: SparksArts on August 21, 2019, 18:02:39 PM
Quote from: ManosPaps on May 03, 2019, 17:20:28 PM
3. In the automated email the tax tag is being displayed but the value is missing.

Is there a solution to this problem!?? Order confirmation emails still don't show the tax total. Tax is showing on the website, but never in emails. This has been a problem for a long time. I installed the latest version 3.4.2.9966 but problem remains.

Title: Re: Questions regarding Invoices, Delivery Notes
Post by: Jörgen on August 21, 2019, 23:23:41 PM
I use a custom template (Hera) with a column for VAT, You do not have this as I can see. Have you perhaps turned off showing VAT in prices (configuration-> prices) ?

Jörgen @ Kreativ Fotografi
Title: Re: Questions regarding Invoices, Delivery Notes
Post by: SparksArts on August 23, 2019, 19:00:15 PM
After a lot of trial and error, I finally found the solution and got the tax total value to display in order confirmation emails.

In Virtuemart Configuration > Pricing > Price Configuration I enabled "Show tax in cart." Although this causes the tax to display twice in the checkout cart on the website, at least now the tax total displays in emails. I should say my e-commerce clients are in the United States where tax is less complicated than VAT. We only have sales tax paid to states, and many states only require sale tax collected if the product is delivered to the same state your business is in.

I also created an HTML override for Virtuemart's invoice/mail_html_pricelist.php to clean up the pricing table layout used in the emails - remove several unnecessary columns and put the sales tax above the order total. Just copy that file, edit as needed, and add it to your template /html/com_virtuemart/invoice/

All is good now!
Richard