Is it possible to add the Form Field Labels for the name and address that is in the email that the shop owner receives when there is a new order?
In the email You have received an order, it says:
For payment/shipping address:
John Doe
Rocket street 1
1234 Paradise City
Greenland
Instead I would like it to display:
First Name: John
Last Name: Doe
Street Address: Rocket Street 1
Post Code: 1234
City: Paradise City
Country: Greenland
Possible either by change or extension?
In catalog/model/checkout/order.php file,
find:
replace with:
Then, find:
replace with:
In catalog/language/english/mail/order.php file,
Find:
add below:
This should return the results you expect in your text email.
find:
Code: Select all
$replace = array(
'firstname' => $order_info['payment_firstname'],
'lastname' => $order_info['payment_lastname'],
'company' => $order_info['payment_company'],
'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']
);
Code: Select all
$replace = array(
'firstname' => str_replace(array('{firstname}'), array($order_info['payment_firstname']), $this->language->get('text_firstname')),
'lastname' => str_replace(array('{lastname}'), array($order_info['payment_lastname']), $this->language->get('text_lastname')),
'company' => str_replace(array('{company}'), array($order_info['payment_company']), $this->language->get('text_company')),
'address_1' => str_replace(array('{address_1}'), array($order_info['payment_address_1']), $this->language->get('text_address_1')),
'address_2' => str_replace(array('{address_2}'), array($order_info['payment_address_2']), $this->language->get('text_address_2')),
'city' => str_replace(array('{city}'), array($order_info['payment_city']), $this->language->get('text_city')),
'postcode' => str_replace(array('{postcode}'), array($order_info['payment_postcode']), $this->language->get('text_postcode')),
'zone' => str_replace(array('{zone}'), array($order_info['payment_zone']), $this->language->get('text_zone')),
'zone_code' => str_replace(array('{zone_code}'), array($order_info['payment_zone_code']), $this->language->get('text_zone_code')),
'country' => str_replace(array('{country}'), array($order_info['payment_country']), $this->language->get('text_country')),
);
Code: Select all
$replace = array(
'firstname' => $order_info['shipping_firstname'],
'lastname' => $order_info['shipping_lastname'],
'company' => $order_info['shipping_company'],
'address_1' => $order_info['shipping_address_1'],
'address_2' => $order_info['shipping_address_2'],
'city' => $order_info['shipping_city'],
'postcode' => $order_info['shipping_postcode'],
'zone' => $order_info['shipping_zone'],
'zone_code' => $order_info['shipping_zone_code'],
'country' => $order_info['shipping_country']
);
Code: Select all
$replace = array(
'firstname' => str_replace(array('{firstname}'), array($order_info['shipping_firstname']), $this->language->get('text_firstname')),
'lastname' => str_replace(array('{lastname}'), array($order_info['shipping_lastname']), $this->language->get('text_lastname')),
'company' => str_replace(array('{company}'), array($order_info['shipping_company']), $this->language->get('text_company')),
'address_1' => str_replace(array('{address_1}'), array($order_info['shipping_address_1']), $this->language->get('text_address_1')),
'address_2' => str_replace(array('{address_2}'), array($order_info['shipping_address_2']), $this->language->get('text_address_2')),
'city' => str_replace(array('{city}'), array($order_info['shipping_city']), $this->language->get('text_city')),
'postcode' => str_replace(array('{postcode}'), array($order_info['shipping_postcode']), $this->language->get('text_postcode')),
'zone' => str_replace(array('{zone}'), array($order_info['shipping_zone']), $this->language->get('text_zone')),
'zone_code' => str_replace(array('{zone_code}'), array($order_info['shipping_zone_code']), $this->language->get('text_zone_code')),
'country' => str_replace(array('{country}'), array($order_info['shipping_country']), $this->language->get('text_country')),
);
Find:
Code: Select all
$_['text_update_footer']
Code: Select all
$_['text_firstname'] = 'First name: {firstname}';
$_['text_lastname'] = 'Last name: {lastname}';
$_['text_company'] = 'Company: {company}';
$_['text_address_1'] = 'Address 1: {address_1}';
$_['text_address_2'] = 'Address 2: {address_2}';
$_['text_city'] = 'City: {city}';
$_['text_postcode'] = 'Postcode: {postcode}';
$_['text_zone'] = 'Zone: {zone}';
$_['text_zone_code'] = 'Zone Code: {zone_code}';
$_['text_country'] = 'Country: {country}';
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 13 guests