This is how the default email I receive begins:
You have received an order.
Order ID: 14862
Date Added: 04/05/2014
Order Status: Complete
Not very helpful.
I decided I'd find out where this comes from and see if I could do anything about it.
The text on the first line comes from the file ./catalog/language/english/mail/order.php. The relevant line in the file is $_['text_new_received'] = 'You have received an order.';
I changed 'You have received an order.' to 'You have received an order from '
I changed 'You have received an order.' to 'You have received an order from '
A search of other files for 'text_new_received' brings up file ./catalog/model/checkout/order.php which contains the line $text = $language->get('text_new_received') . "\n\n";
Looking through the rest of the file I identified that the item $order_info['email'] contained the email address of the customer. I changed the line in ./catalog/model/checkout/order.php to:
$text = $language->get('text_new_received') . $order_info['email'] . "\n\n";
After upload to the site the email I receive now starts with:
You have received an order from customer@domain.com
Order ID: 14862
Date Added: 04/05/2014
Order Status: Complete
Order ID: 14862
Date Added: 04/05/2014
Order Status: Complete
Job done!
P.S. see the Part 2 posting for a much better way to implement OpenCart changes using vQmod
No comments:
Post a Comment