VirtueMart 1.1.0 - Invoice, Delivery Note, Receipt
VirtueMart 1.1.0 Sending Invoice, Delivery Note, Receipt via Email
Change the file ps_delivery.php in the directory administrator/components/com_virtuemart/classes
There three queries can be found:
1 2 3 |
<?php |
By simply changing the pattern "%Y-%m-%d" to the desired date format (like "%d.%m.%Y) does it. The characters are standing for day, month and year.
Change the lines in the delivery.pdf.php (just above "// Sumarize").
1 2 3 4 5 6 7 |
<?php |
The trick is to change the product_attribute string step by step. First, the HTML-breaks are changed into linebreaks that FPDF can understand. Second, a closing linebreak is added ($varPA . "\n";). Third, to get the linebreaks working, the cell command is extended to the "multicell" command.
The text of e-mail is automatically created from language file. Open the language file (administrator/components/com_virtuemart/languages/common/english.php). Find the string you want to change. E.g. VM_DELIVERY_EMAIL_INVOICE_MESSAGE. Change the 'Dear Customer ...' to 'Dear {customer-name}':
1 2 3 4 5 6 7 8 |
<?php |
Then paste the following code into administrator/components/com_virtuemart/html/order.order_email.php e.g. in row 143 + (invoice):
1 2 3 4 5 6 |
<?php |
The text will be automatically changed in your e-mail: 'Dear Mr. J.P. Newman ...'
If you want that in your documents (invoice, delivery note, receipt) the VAT will be displayed, you can add the information about VAT into the language file (common), e.g.
1 2 3 4 5 6 |
<?php |
If the values will be not empty, the vendor's VAT will be displayed in document.
First go to Admin - Manage User Fields and publish extra field, e.g:
Than add the label name values in language file (common), e.g.:
1 2 3 4 |
<?php |
If the values will be not empty, the customer's VAT will be displayed in document.
If You want to be able to administrate orders from the front end of Joomla! You need to put the pdf-files also in directory components/com_virtuemart/pdf. If You don’t You cannot generate invoices/delivery notes/receipts from that side. If You want to delegate invoicing to another user You most likely want this feature. Just remember to keep the files in sync if You customize them. The error message You get is something like:
Fatal error: ps_delivery::require_once() [function.require]: Failed opening required 'components/com_virtuemart/pdf/delivery.pdf.php' (include_path='.:/usr/lib/php5') in components/com_virtuemart/classes/ps_delivery.php on line 347
Added by PeO
Virtuemart includes a method which changes currency symbol for orders. This method is used in VirtueMart Invoice, Delivery Note and Receipt addon. Example: EUR will be changed to €, USD to $, etc. But not all currencies are listed in this method. So if your currency is not translated, you need to add it to this method.
Open:
administrator\components\com_virtuemart\classes\currency\class_currency_display.php
cca. line 123
method: function getFullValue
Add your currency to this method, e.g. Czech currency symbol, change the code
FROM:
switch($this->symbol) {
case 'USD': $this->symbol='$';break;
case 'EUR': $this->symbol='€';break;
case 'GBP': $this->symbol='£';break;
case 'JPY': $this->symbol='¥';break;
case 'AUD': $this->symbol='AUD $';break;
case 'CAD': $this->symbol='CAD $';break;
case 'HKD': $this->symbol='HKD $';break;
case 'NZD': $this->symbol='NZD $';break;
case 'SGD': $this->symbol='SGD $';break;
}TO:
switch($this->symbol) {
case 'USD': $this->symbol='$';break;
case 'EUR': $this->symbol='€';break;
case 'GBP': $this->symbol='£';break;
case 'JPY': $this->symbol='¥';break;
case 'AUD': $this->symbol='AUD $';break;
case 'CAD': $this->symbol='CAD $';break;
case 'HKD': $this->symbol='HKD $';break;
case 'NZD': $this->symbol='NZD $';break;
case 'SGD': $this->symbol='SGD $';break;
// Modified currency symbol
case 'CZK': $this->symbol='Kč';break;
}Don't forget to save the modified file as UTF-8 without BOM.
|
|