VirtueMart Invoice, Delivery Note and Receipt
Guide and files used on this site are not more supported.
This article describes how to install 'Invoice, Delivery Note, Receipt' addon for VirtueMart 1.1.0 (VirtueMart is created by Soeren Eberhardt, this addon was created by Ingemar Fällman, refactored for VirtuMart 1.1.x version and new PDF behaviour added by Jan Pavelka) in Joomla! 1.5.
The addon produces PDF Invoices, Delivery notes and Receipts from Orders created by VirtueMart users (customers).
If you have installed Joomla!1.5 and VirtueMart 1.1 on your server, do following steps...
1. Download the following file from this server.
Download VirtueMart Invoice, Delivery Note, Receipt Addon
2. Copy 'admin.install_delivery_sql.php':
- FROM 'com_virtuemart_IDnR_addon.zip/administrator/components/com_virtuemart/html/admin.install_delivery_sql.php'
- TO your server: 'administrator/components/com_virtuemart/html/admin.install_delivery_sql.php'
3. Login as administrator into your site in administrator area. Copy the following URL link (change the [your-site] to your own site), paste it into the address bar of your browser and click enter on your keyboard:
This script install necessary data into your database. After successfull installation of this data remove the 'admin.install_delivery_sql.php' FROM your server.
4. Copy the following files into your server:
- FROM 'com_virtuemart_IDnR_addon.zip/administrator/components/com_virtuemart/classes/ps_delivery.php'
- TO your server: 'administrator/components/com_virtuemart/classes/ps_delivery.php'
- FROM 'com_virtuemart_IDnR_addon.zip/administrator/components/com_virtuemart/classes/ps_order_delivery.php'
- TO your server: 'administrator/components/com_virtuemart/classes/ps_order_delivery.php'
- FROM 'com_virtuemart_IDnR_addon.zip/administrator/components/com_virtuemart/pdf/delivery.pdf.php'
- TO your server: 'administrator/components/com_virtuemart/pdf/delivery.pdf.php'
- FROM 'com_virtuemart_IDnR_addon.zip/administrator/components/com_virtuemart/pdf/phoca.tcpdf.php'
- TO your server: 'administrator/components/com_virtuemart/pdf/phoca.tcpdf.php'
- FROM 'com_virtuemart_IDnR_addon.zip/libraries/joomla/document/printpdf/index.html'
- TO your server: 'libraries/joomla/document/printpdf/index.html'
- FROM 'com_virtuemart_IDnR_addon.zip/libraries/joomla/document/printpdf/printpdf.php'
- TO your server: 'libraries/joomla/document/printpdf/printpdf.php'
5. Modify (edit in text editor) the following files (Before you do it, please backup your files) on your server:
Paste the following code (without tags) into this file (don't forget to add the comma (,) after the last item before these new items)
Other Langages: Download VirtueMart Invoice, Delivery Note, Receipt Addon Languages
Row: 170 + (in VirtueMart 1.1.5 it is a line cca 191)
Paste the following code (without tags) after row 170 (after $tab->endTab(); and before $tab->endPane();)
For sending Invoice, Delivery Note, Receipt via Email see the
'Sending Invoice, Delivery Note, Receipt via Email' addon.
If you have an order in your VirtueMart, go to Orders » List Orders. Click on Order Number of an Order and you should see the folder Delivery here. You can create Invoices, Delivery notes and Receipts here and print them as PDF document.
PDF document needs to have header without any error, sometimes it can happen, that some error is rendered before the document header. Then PDF cannot be displayed in browser. In such case check out your Joomla! and VirtueMart installation if it does not produce php errors.
Mostly this is caused by wrong encoding of the files - e.g. language file. Check if your langauge file is saved as UFT-8 without BOM encoding. You can check it with text editor like e.g. Notepad++ is. Open the language file (e.g. administrator/components/com_virtuemart/languages/common/english.php) in Notepad++, click on Encoding and select Encoding in UFT-8 without BOM. And save the file.