VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: duncan12 on July 11, 2016, 21:25:18 PM

Title: Stop sending PDF invoice
Post by: duncan12 on July 11, 2016, 21:25:18 PM
I was able to customize the invoice email so that the Order Summary actually made sense :-)

But VM also sends a PDF attachment along with the email. The PDF still contains the screwy Order Summary. So:

a) how do I customize the Order Summary (total, shipping, tax, etc) section of the attached Invoice PDF, or
b) how do I get VM stop sending the PDF?

VirtueMart 3.0.16
Title: Re: Stop sending PDF invoice
Post by: jjk on July 11, 2016, 21:55:58 PM
I thought the pdf invoice uses the html version as input, but I might be wrong. Personally I don't use VM to send invoices. Maybe somebody else can answer case a).
For case b) I think you can simply leave the 'Default Order Status to create an invoice' field in the VM email configuration blank.
Title: Re: Stop sending PDF invoice
Post by: jenkinhill on July 12, 2016, 00:01:42 AM
To customise the invoice I'd look at overriding components/com_virtuemart/views/invoice/tmpl/invoice_items.php

To nbot send an invoice, in VM3.0.17.2 there is an option of None for Default Order Status to create an invoice  in VM Configuration/Emails

Title: Re: Stop sending PDF invoice
Post by: duncan12 on July 12, 2016, 00:40:33 AM
Yes, I thought overriding components/com_virtuemart/views/invoice/tmpl/invoice_items.php would do the trick too, but it doesn't. It only overrides the html email that is sent. The PDF doesn't get changed at all. Odd, yes?
Title: Re: Stop sending PDF invoice
Post by: reinhold on July 12, 2016, 08:52:59 AM
The invoices use those templates. However, the invoice PDFs are cached, so they are not re-generated when you modify the template override... If you remove the PDF invoice file on the server or generate a new order, then the template override should be used.

Best regards,
Reinhold