Post by deanmoke » Sun Apr 03, 2016 5:37 pm

Hi,
I am using OC 2.1.0.2
I am using the default fax field for customers membership numbers and have changed the language files to reflect that but now I need that field to be shown in the order emails I receive.
Is this possible?
Thanks,
Dean
Last edited by deanmoke on Mon Apr 04, 2016 7:06 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Sep 10, 2015 5:41 pm

Post by oc-extensions » Mon Apr 04, 2016 12:21 am

Hi,

Which OpenCart version you use? OC1.5.x or OC2.x?

Image | Extensions and Custom Development


User avatar
Active Member

Posts

Joined
Fri Jan 06, 2012 11:31 pm

Post by deanmoke » Mon Apr 04, 2016 7:05 am

oc-extensions wrote:Hi,

Which OpenCart version you use? OC1.5.x or OC2.x?
I am using OC 2.1.0.2
Thanks,
Dean

Newbie

Posts

Joined
Thu Sep 10, 2015 5:41 pm

Post by oc-extensions » Mon Apr 04, 2016 4:13 pm

Hi,

In catalog/model/checkout/order.php in function addOrderHistory find area:

Code: Select all

$data['telephone'] = $order_info['telephone'];
and after this line add:

Code: Select all

$data['fax'] = $order_info['fax'];
Now in catalog/view/theme/your_theme/template/mail/order.tpl in place you want use

Code: Select all

<?php echo $fax; ?>
Lines above are for email sent to customer;


If you want to include same field in admin mail then in same function ex (before or where you neeed) find:

Code: Select all

$text .= $language->get('text_new_order_id') . ' ' . $order_id . "\n";
afther this line add:

Code: Select all

$text .= $language->get('text_fax_or_etc') . ' ' . $order_info['fax'] . "\n";
Don't forget to define in language file

Code: Select all

$_text_fax_or_etc = 'Some text you want';
Be sure you added text only in admin email (IF THAT'S WHAT YOU WANT)

Image | Extensions and Custom Development


User avatar
Active Member

Posts

Joined
Fri Jan 06, 2012 11:31 pm

Post by deanmoke » Tue Apr 05, 2016 1:07 pm

It works!
Fantastic!
Thanks oc-extensions, much appreciated.
Dean

Newbie

Posts

Joined
Thu Sep 10, 2015 5:41 pm
Who is online

Users browsing this forum: No registered users and 49 guests