I have add Custom field with name VATID.
then on admin/controller/sale/order.php
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{vatid}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
$find = array(
'{firstname}',
'{lastname}',
'{company}',
'{vatid}',
'{address_1}',
'{address_2}',
'{city}',
'{postcode}',
'{zone}',
'{zone_code}',
'{country}'
);
$replace = array(
'firstname' => $order_info['payment_firstname'],
'lastname' => $order_info['payment_lastname'],
'company' => $order_info['payment_company'],
'vatid' => $order_info['payment_custom_field'],
'address_1' => $order_info['payment_address_1'],
'address_2' => $order_info['payment_address_2'],
'city' => $order_info['payment_city'],
'postcode' => $order_info['payment_postcode'],
'zone' => $order_info['payment_zone'],
'zone_code' => $order_info['payment_zone_code'],
'country' => $order_info['payment_country']
);
$payment_address = str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format))));
When i echo $payment_address in order_invoice.tpl VATID is not showing!
then on admin/controller/sale/order.php
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{vatid}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
$find = array(
'{firstname}',
'{lastname}',
'{company}',
'{vatid}',
'{address_1}',
'{address_2}',
'{city}',
'{postcode}',
'{zone}',
'{zone_code}',
'{country}'
);
$replace = array(
'firstname' => $order_info['payment_firstname'],
'lastname' => $order_info['payment_lastname'],
'company' => $order_info['payment_company'],
'vatid' => $order_info['payment_custom_field'],
'address_1' => $order_info['payment_address_1'],
'address_2' => $order_info['payment_address_2'],
'city' => $order_info['payment_city'],
'postcode' => $order_info['payment_postcode'],
'zone' => $order_info['payment_zone'],
'zone_code' => $order_info['payment_zone_code'],
'country' => $order_info['payment_country']
);
$payment_address = str_replace(array("\r\n", "\r", "\n"), '<br />', preg_replace(array("/\s\s+/", "/\r\r+/", "/\n\n+/"), '<br />', trim(str_replace($find, $replace, $format))));
When i echo $payment_address in order_invoice.tpl VATID is not showing!
I would have 'mis'-used an existing, but not used default Variable, like the Fax Number, for such a Task, then, you would just have to rename a language line contnent. It would have made Life a little easier, I assume. There are Mod's, and possibly even OC v.2 Functions, making such visible on invoices as well.
just to mention it.
Ernie
bigmax.ch/shop/
just to mention it.
Ernie
bigmax.ch/shop/
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Sorry, but I figured, you wanted to display some Customer related Information on the invoice,
and the (text/title-wise adapted) Customer FAX-Field Content would be such a place, to do this...
Ernie
and the (text/title-wise adapted) Customer FAX-Field Content would be such a place, to do this...
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
ExactlyIP_CAM wrote:Sorry, but I figured, you wanted to display some Customer related Information on the invoice,
and the (text/title-wise adapted) Customer FAX-Field Content would be such a place, to do this...
Ernie
then, there you go:
http://www.opencart.com/index.php?route ... n_id=22666
then, find some Mod, or possibly built-in Option, to display it on the invoice:
http://www.opencart.com/index.php?route ... %20Invoice
I once created such a Mod for OC v.1.5.6.x:
http://www.opencart.com/index.php?route ... n_id=22454
you should be able, I guess, to make it work!
Good Luck
Ernie
http://www.opencart.com/index.php?route ... n_id=22666
then, find some Mod, or possibly built-in Option, to display it on the invoice:
http://www.opencart.com/index.php?route ... %20Invoice
I once created such a Mod for OC v.1.5.6.x:
http://www.opencart.com/index.php?route ... n_id=22454
you should be able, I guess, to make it work!
Good Luck
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
No luckIP_CAM wrote:then, there you go:
http://www.opencart.com/index.php?route ... n_id=22666
then, find some Mod, or possibly built-in Option, to display it on the invoice:
http://www.opencart.com/index.php?route ... %20Invoice
I once created such a Mod for OC v.1.5.6.x:
http://www.opencart.com/index.php?route ... n_id=22454
you should be able, I guess, to make it work!
Good Luck
Ernie
Problem is fixed! I clean the cache! Thank you very much to all and Happy new year!
Who is online
Users browsing this forum: No registered users and 119 guests