News:

Support the VirtueMart project and become a member

Main Menu

PDF invoice

Started by jormis02, May 23, 2021, 12:04:09 PM

Previous topic - Next topic

jormis02

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

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jormis02

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 ?

GJC Web Design

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

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jormis02

#5
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 ?

GJC Web Design

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?

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jormis02

Yes 1.0.9 in use but 1.0.8 in older working setup.

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