Author Topic: Testing and debugging the invoice  (Read 1058 times)

Huubs

  • Jr. Member
  • **
  • Posts: 213
Testing and debugging the invoice
« on: January 31, 2020, 16:49:26 pm »
Hello,

Looking at this page (https://docs.virtuemart.net/manual/general-concepts/205-invoices.html) it's possible to see the output of the invoice from every order so I can more easily debug and test the output of the invoice (instead of making a new order constantly). Unfortunately, the docs seem outdated, I don't get the view out of it.

Does someone know the correct working link for this? I want to see the invoice in plain html, see the mail invoice etc.

This does not work:

Code: [Select]
/index.php?option=com_virtuemart&view=invoice&layout=invoice&format=pdf&tmpl=component&virtuemart_order_id=7

or

/index.php?option=com_virtuemart&view=invoice&layout=mail&tmpl=component&virtuemart_order_id=7

Also when I check my url it seems different, and calls a task:

Code: [Select]
/index.php?option=com_virtuemart&view=orders&task=callInvoiceView&tmpl=component&virtuemart_order_id=7&layout=invoice
Anyone know the correct url?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Testing and debugging the invoice
« Reply #1 on: January 31, 2020, 17:26:04 pm »
no idea .. I just put die(); at the end of the invoice default template and toggle the status -- there's your complete html invoice
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

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #2 on: February 01, 2020, 14:07:45 pm »
no idea .. I just put die(); at the end of the invoice default template and toggle the status -- there's your complete html invoice

Ah ok thank you, I'll check it out to see if that works for me. Does that mean that the email does not get sent or anything?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Testing and debugging the invoice
« Reply #3 on: February 02, 2020, 13:06:32 pm »
just use a previously confirmed order with invoice, delete the invoice from your safe path folder invoices and click the invoice view icon on the order
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

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #4 on: February 02, 2020, 16:13:35 pm »
just use a previously confirmed order with invoice, delete the invoice from your safe path folder invoices and click the invoice view icon on the order

CanI also debug the email templates with this method?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Testing and debugging the invoice
« Reply #5 on: February 02, 2020, 16:26:41 pm »
yes.. die() the default but there is already an admin setting for email debugging
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

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #6 on: February 03, 2020, 09:34:52 am »
yes.. die() the default but there is already an admin setting for email debugging

Could you tel me where? Because I saw tha you can use a certain link, but that is not working anymore with the newest VM

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Testing and debugging the invoice
« Reply #7 on: February 03, 2020, 10:47:31 am »
?
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

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #8 on: February 06, 2020, 11:50:31 am »
How can I debug the PDF invoice? I tried add die() at the end but it still generates the PDF instead of displaying the HTML first...

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Testing and debugging the invoice
« Reply #9 on: February 06, 2020, 11:54:14 am »
Quote
just use a previously confirmed order with invoice, delete the invoice from your safe path folder invoices
!!!
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

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #10 on: February 06, 2020, 12:26:56 pm »
Quote
just use a previously confirmed order with invoice, delete the invoice from your safe path folder invoices
!!!

I understand that but is it possible to get the HTML first? That is easier debugging for me instead of checking the PDF constantly

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9648
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Testing and debugging the invoice
« Reply #11 on: February 06, 2020, 12:59:32 pm »
it does stop on the html if u have the die() in the correct file

templates\xxxx\html\com_virtuemart\invoice\invoice.php
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

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #12 on: February 06, 2020, 13:10:32 pm »
it does stop on the html if u have the die() in the correct file

templates\xxxx\html\com_virtuemart\invoice\invoice.php

That is weird, because I have that in my file, except it just starts the download...

Huubs

  • Jr. Member
  • **
  • Posts: 213
Re: Testing and debugging the invoice
« Reply #13 on: February 10, 2020, 07:49:16 am »
Ok I think I have to just download the invoice over and over again. No big deal. But the problem lies in the fact that I can't seem to make the invoice totally blank. It keeps printing the line above and below the page, and also the vendor's logo. How can I amke the PDF totally blank?


Found it, it's in the Store page and then Templating/Invoices where you can disbale the lines and header.