VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: jormis02 on May 23, 2021, 12:04:09 PM

Title: PDF invoice
Post by: jormis02 on May 23, 2021, 12:04:09 PM
Hi,

I would like to do own header for PDF invoice but whatever try I make has no effect.
If I look this -> Here you can configure the look of invoices, delivery notes etc. You can take a look at a preview page (after saving the changes) HERE.
it stays same all time and pdf after order comes in same type, no change. If I do it from Order menu, it has correct header but not direct from customer order.

VirtueMart 3.8.8 10472
Joomla 3.9.26
Title: Re: PDF invoice
Post by: jenkinhill on May 23, 2021, 13:31:27 PM
Best way to change invoice layout is by edit and override invoice.php

eg see http://forum.virtuemart.net/index.php?topic=145739.msg517717#msg517717
Title: Re: PDF invoice
Post by: GJC Web Design on May 23, 2021, 15:38:34 PM
and once the pdf is created you must manually delete it in the safe folder otherwise it just reshows the existing one

I am not sure the "Here you can configure the look of invoices, delivery notes etc. You can take a look at a preview page (after saving the changes) HERE." is 100% bug free
there is also the possibility the invoice components\com_virtuemart\views\invoice\tmpl\invoice.php is already over ridden in your template

As Jenks says it is far simpler just to hard code your header straight into the template over ride
Title: Re: PDF invoice
Post by: jormis02 on May 23, 2021, 16:23:06 PM
I did not have invoice.php override. I add it now and play little bit... that HERE link stays same. No change. Where I can see how my changes take effect ?
Title: Re: PDF invoice
Post by: GJC Web Design on May 23, 2021, 17:44:01 PM
make an order, confirm and produce an invoice

delete the invoice in the safe path

either put die(); at the end of  templates\YOURS\com_virtuemart\invoice\invoice.php so it displays when u click on the order display invoice or open the pdf every time after changes .. then delete and try again

Title: Re: PDF invoice
Post by: jormis02 on May 23, 2021, 17:54:35 PM
Making invoice in Order menu do have correct layout but when system generates pdf after order and send it by email ... it is same as link "Here" -> wrong layout.
So I can do nice layout, test it in admin but new order will do wrong layout.

This worked in 3.8.6 10373

Do the version of tcpdf effect this ?
Title: Re: PDF invoice
Post by: GJC Web Design on May 23, 2021, 18:06:01 PM
you should be using 1.0.9

http://dev.virtuemart.net/attachments/download/1271/com_tcpdf_1.0.9.zip

and your definitely deleting the pdf from the safe path folder each time?

Title: Re: PDF invoice
Post by: jormis02 on May 23, 2021, 18:19:42 PM
Yes 1.0.9 in use but 1.0.8 in older working setup.

Deleting done every testing case "here" / admin panel / new order