News:

Support the VirtueMart project and become a member

Main Menu

download PDF invoices from VirtueMart frontend

Started by kok, October 16, 2013, 11:28:25 AM

Previous topic - Next topic

kok

I want to provide users with possibility to download their PDF invoices from VirtueMart frontend
Tell me how to do it?
Joomla! 2.5.27
VirtueMart 2.6.10

mekajames

Hello this is a good question?

anyone would know on how to do it please?

Adwans

Hello, comeone, can anybody answer?
Many folks asked about this feature, with no success, is it hard to have links to invoices, links to PDF from the frontend;)
Mysterious facts...

GJC Web Design

well, your the 3rd in 3 years.. and it isn't so simple because the pdfs are stored above (or should be) the public html folder so it isn't a case of a simple generated link.

I have no idea if Max is considering this...
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

Adwans

Ok, let me answer myself ;) VM 3 J 3,5
If you have the order already confirmed, it is possible to use FE links to  the (recently created) invoice.
So, in orders/details.php file  - for example in template's html override folder  - add sth like this:

<div class="button" style="float:left"><a style="color:#333" target="_blank" href="index.php/en/?option=com_virtuemart&view=invoice&layout=invoice&format=pdf&tmpl=component&virtuemart_order_id=<?php echo($this->orderdetails['details']['BT']->virtuemart_order_id);?>&order_number=<?php echo($this->orderdetails['details']['BT']->order_number);?>&order_pass=aaa">Invoice in PDF</a></div>

Order pass is a dummy value here, it is not needed here, I suppose. It works only having invoice already created.
It works too:
<div class="button" style="float:left"><a style="color:#333" target="_blank" href="index.php/en/?option=com_virtuemart&view=invoice&layout=invoice&format=html&tmpl=component&virtuemart_order_id=<?php echo($this->orderdetails['details']['BT']->virtuemart_order_id);?>&order_number=<?php echo($this->orderdetails['details']['BT']->order_number);?>&order_pass=aaa">Invoice in HTML</a></div>

@GJC, not 3rd but 5 or 6th ;)
Regards Z.