Hi all,
Been trying to figure out how to customize the Order Status email, and I finally got it working ! Just thought I'd share with y'all :)
(This is for 1.3.7. Not sure if this is the best way to do it, but it works for me so here it goes...)
First, backup the 2 files that you will be modifying, since the override system does not work in these directories :
/admin/order.php
/admin/includes/languages/your_language/orders.php
Now let's assume we'll only add a footer to your Order Status emails.
In /admin/order.php, find around line 110 :
Change the ";" at the end of the line to ".", like this :Code:EMAIL_TEXT_STATUS_PLEASE_REPLY;
Then, add one more line below it :Code:EMAIL_TEXT_STATUS_PLEASE_REPLY .
In /admin/order.php, find around line 121 :Code:SHIRSTER_EMAIL_TEXT_STATUS_FOOTER;
Add one more line below it :Code:$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
Now, go to /admin/includes/languages/your_language/orders.php, find around line 95 :Code:$html_msg['SHIRSTER_EMAIL_TEXT_STATUS_FOOTER'] = str_replace('\n','', SHIRSTER_EMAIL_TEXT_STATUS_FOOTER);
Add one line below it :Code:define('EMAIL_TEXT_STATUS_PLEASE_REPLY', 'Please reply to this email if you have any questions.' . "\n");
If you want to have line breaks in your footer, add something like this instead :Code:define('SHIRSTER_EMAIL_TEXT_STATUS_FOOTER', 'Your footer text goes here' . "\n");
If you want more space above your footer message, change around line 95 :Code:define('SHIRSTER_EMAIL_TEXT_STATUS_FOOTER', 'Your footer text line one' . "\n" . 'Your footer text line two' . "\n");
Of course, I'm only using 'SHIRSTER_EMAIL_TEXT_STATUS_FOOTER' simply because it's self-explanatory (to me anyway), and by using 'SHIRSTER' it's unlikely to conflict with zen cart's own constants if a footer message does get into core one day. Also, I will be able to search for all my customizations in the Developers Tool Kit later on and see where I've changed things.Code:define('SHIRSTER_TEXT_STATUS_PLEASE_REPLY', 'Please reply to this email if you have any questions.' . "\n\n");
Please DO use a DIFFERENT name of your choice :)
Shirley



