Author Topic: PDF invoice  (Read 1931 times)

jormis02

  • Beginner
  • *
  • Posts: 15
PDF invoice
« 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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28184
  • Always on vacation
    • Jenkin Hill Internet
Re: PDF invoice
« Reply #1 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
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10220
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: PDF invoice
« Reply #2 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
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jormis02

  • Beginner
  • *
  • Posts: 15
Re: PDF invoice
« Reply #3 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 ?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10220
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: PDF invoice
« Reply #4 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

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jormis02

  • Beginner
  • *
  • Posts: 15
Re: PDF invoice
« Reply #5 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 ?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10220
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: PDF invoice
« Reply #6 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?

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jormis02

  • Beginner
  • *
  • Posts: 15
Re: PDF invoice
« Reply #7 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