Changing the subject line in Zen Cart-generated emails

Email subject lines typically consist of two parts, a piece of static text that says something like "Order Confirmation" or "Message from" and some dynamic content such as an order number or your store's name.

Changing the static text is straightforward. It is normally defined in the language file for the function that generates the email. Thus you would look in your includes/languages/YOUR_LANGUAGE folder (e.g. includes/languages/english) for the following files contact_us.php, create_account.php, checkout_process.php, gv_end.php and tell_a_friend.php. And within these files for a define statement for 'EMAIL_TEXT_SUBJECT' or 'EMAIL_SUBJECT'. You can then edit the associated text, but remember to save your changes to an over-ride file (language over-rides are described elsewhere in this FAQ). Remember also that if you  want to use an apostophe or other special character, you must put a backslash in front of it (e.g. define('EMAIL_TEXT_SUBJECT', 'Important Message from Simple Sammy\'s Smart Snail Store'); )

The "low stock email" is slightly different in that it's EMAIL_TEXT_SUBJECT is defined in email_extras.php, but should still be over-ridden in the same way. The "order update" email is different again as it is generated from the admin side of your site and so the define statement is in admin/includes/languages/YOUR_LANGUAGE/orders.php which cannot be over-ridden. If you edit it, make sure you keep a copy (outside of your site).

Changing the dynamic data is more tricky and may require progamming skills. But if you wanted, for example, to replace the "#" with "Number:" in the "order update email" you would search your site for where the subject's define constant is used (in this example EMAIL_TEXT_SUBJECT is used twice in admin/orders.php) and replace the ' #' that follows it with ' Number:'.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...