Zen Cart Logo
Forums / General Questions / How to modify email template, need help

How to modify email template, need help

Locked

Views: 21,895

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
22 Aug 2007, 3:01 PM
#1
sabulite avatar

sabulite

New Zenner

Join Date:
Aug 2007
Posts:
2
Plugin Contributions:
0

How to modify email template, need help

Dear All,

Anyone know how to modify the email which after complete purchase, the system will generate a email to buyer..which file ? any advice?

I had tried to modify the file below, but seems like it dowsn't work..

../email/email_template_order_status.html

please help...

22 Aug 2007, 9:59 PM
#2
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: How to modify email template, need help

Are you familiar with the template override feature?

Basically, ZenCart comes with default_template and language files which contain the default template and customizable verbage. You can modify these files to customize your layout, but you do so at great peril because these may be overwritten by ZenCart updates.

To get around this, ZenCart uses a template override system. Any of the template files can be copied to parallel folders named "Custom" or any other name you choose to call your custom template. Then you can modify the file in the custom folder to your hearts content without disturbing the default file.

In the case of these emails, you need to copy /includes/languages/english/checkout_process.php to /includes/languages/english/[custom]/checkout_process.php.

Another file, which contains most of the purchase confirmation verbage is /includes/languages/english/html_includes/define_checkout_success.php. Copy this to /includes/languages/english/[custom]/html_includes/define_checkout_sucess.php and modify to your liking.

Note: Replace [custom] with the actual name of your custom template...and be sure to use the same name for all folders containing custom template files. Note: You may already have a custom template in use. (check admin tools-->select template screen to find out.) If so place the files in folders with that name.

If you did not have a custom template already established, then you will need to activate your new custom template in admin at Tools -->template selection. You do not need to copy all default template files to your custom template folders. Only generate custom files you need to modify your site. ZenCart checks for custom files first and if a specific file is not found, it uses the default file.

Ron

4 Sep 2007, 2:45 AM
#3
beth_katherine avatar

beth_katherine

Zen Follower

Join Date:
Feb 2007
Posts:
158
Plugin Contributions:
0

Re: How to modify email template, need help

Ron you seem to be the one to ask this question.

How do I change the logo on the ADMIN emails to mine instead of Zen-Cart's?

Beth-Katherine

4 Sep 2007, 4:37 AM
#4
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: How to modify email template, need help

The way I did it was to replace /email/header.jpg. Note that this location is not part of the oveerride system, so you may need to replace your logo again after an update to ZenCart.

In my case, we created a complete banner image 550 pixels wide x 102 height.

Ron

5 Sep 2007, 1:21 PM
#5
beth_katherine avatar

beth_katherine

Zen Follower

Join Date:
Feb 2007
Posts:
158
Plugin Contributions:
0

Re: How to modify email template, need help

ronlee67:

The way I did it was to replace /email/header.jpg. Note that this location is not part of the oveerride system, so you may need to replace your logo again after an update to ZenCart.

In my case, we created a complete banner image 550 pixels wide x 102 height.

Ron

I did this Ron but the Zen-Cart header is still on the email I sent from admin at Tools send email. I can't find WHERE this template is located to change the copyright info at the bottom either.

When I changed that header.jpg and the logo.gif I was able to customize my Admin panel and Contact Us form, the Welcome Email but not the Send Email feature under Tools.

Beth-Katherine Kaiman

5 Sep 2007, 1:39 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to modify email template, need help

Beth,
The HTML-formatted emails are built from the files in the /email folder.
There is only one image used by default. If you've replaced the header.jpg file there, then that's what will be used.
If you're not seeing the change in your email program, then your email program has a cache that's remembering the old image. You'll need to clear its cache in order for it to bring up the right image. Sometimes pressing F5 is enough. Sometimes restarting the email program is enough. Sometimes it needs to be more drastic than that. It depends on your email program.

The documentation on the HTML email template system is found in the /docs folder.

5 Sep 2007, 5:41 PM
#7
beth_katherine avatar

beth_katherine

Zen Follower

Join Date:
Feb 2007
Posts:
158
Plugin Contributions:
0

Re: How to modify email template, need help

Thanks Dr. B. The problem is with my email program on my MAC. I can't find where to dump the cache but tried the email to an AOL address and it worked.

What's weird though is that I can't seem to mail anyone any product notifications or newslettters as no names show up on my to send list. In fact the "to send to" list is gone.

What settings am I not seeing?

Beth-katherine

5 Sep 2007, 6:16 PM
#8
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: How to modify email template, need help

I'll take another look. That's right, /email/header.jpg appears on the customer notification emails that go out automatically. I didn't pick up on the distinction between these and those manually sent from admin.

The way I found to be fastest to track this down is to send one of those emails to myself and then look at the source code for the email after it arrives. Find the first image file reference (.gif, .jpg, etc.) and that is likely to be the logo. I have added my logo in a number of places, so it wouldn't surprise me if you change the one in the email it might also change in the packing slips, invoices, or somewhere else.

You might be able to track it down faster than I right now as I am recovering from an operation and have to take it easy.

5 Sep 2007, 6:31 PM
#9
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: How to modify email template, need help

I just manually issued an email from admin/tools and analyzed the source code in the resulting email. I can confirm what Dr. Byte said earlier, the email/header.jpg is the image that appears in these emails as well as the automatically generated emails.

I don't have any ideas about your missing 'send to:' pull down list.

Ron

5 Sep 2007, 7:01 PM
#10
beth_katherine avatar

beth_katherine

Zen Follower

Join Date:
Feb 2007
Posts:
158
Plugin Contributions:
0

Re: How to modify email template, need help

Thanks Ron for your help. I was starting to think I was going buggy again.

I've made a list of files and images I've changed in anticipation for the next upgrade.

The missing email addresses for product notification and newsletters is strange. I've searched through every section of the ADMIN panel and cannot find where to check to accept email addresses.

Beth

5 Sep 2007, 7:44 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to modify email template, need help

Beth-katherine:

Thanks Ron for your help. I was starting to think I was going buggy again.

I've made a list of files and images I've changed in anticipation for the next upgrade.

The missing email addresses for product notification and newsletters is strange. I've searched through every section of the ADMIN panel and cannot find where to check to accept email addresses.

Beth

This thread has gone way off topic now. Nevertheless ...

The send-to address pulldown is built from predefined groupings.

What version of Zen Cart do you have presently? What versions have you upgraded from? What's been the history of your store and its database?

6 Sep 2007, 1:01 PM
#12
beth_katherine avatar

beth_katherine

Zen Follower

Join Date:
Feb 2007
Posts:
158
Plugin Contributions:
0

Re: How to modify email template, need help

DrByte:

This thread has gone way off topic now. Nevertheless ...

The send-to address pulldown is built from predefined groupings.

What version of Zen Cart do you have presently? What versions have you upgraded from? What's been the history of your store and its database?

I'm using the most current version with the most recent upgrade. My cart started out in February on one small company's server and was transferred to another bigger company's server. It was moved again by the bigger company to a more powerful server (probably due to all the traffic one of my sites was receiving).

I just tested the products notification again. Wrote the word test in the contents section, choose a product and when I clicked send I received the following message:

**Customers receiving this Product Notification: 0

**I tested the newsletter and have the pull down menu, choose the names and sent the email. At least this works. Weird that the product notification doesn't work. Shall I start a thread in a different section asking why?

Beth-Katherine

6 Sep 2007, 4:34 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to modify email template, need help

Product notification recipients are determined by the Customers.
When you're sending product notifications, you are only sending to those customers who have specifically asked to be included on newsletters that you send to people about that particular product.

Customers can opt-in to particular notifications via:

  • My Account
  • checkout-success page (checkboxes there)
  • notification sidebox on a given product page

If you get 0 recipients when sending, that just means nobody has asked to be notified.

If you want to send to everyone instead, then ... use the Newsletter mode instead of the Product Notification mode.

5 Dec 2007, 2:15 AM
#14
enkhbayar avatar

enkhbayar

New Zenner

Join Date:
Nov 2007
Posts:
6
Plugin Contributions:
0

Re: How to modify email template, need help

Is there available any module to customize emails templates from admin panel?

I don't wanna to search and edit files one by one? :huh:

5 Dec 2007, 3:29 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: How to modify email template, need help

enkhbayar:

Is there available any module to customize emails templates from admin panel?

I don't wanna to search and edit files one by one? :huh:

No, there is not presently any admin-based tool for this.
The 15 email template files can generally be edited quite easily, often with a bit of copy-and-paste.

5 Dec 2007, 4:45 AM
#16
enkhbayar avatar

enkhbayar

New Zenner

Join Date:
Nov 2007
Posts:
6
Plugin Contributions:
0

Re: How to modify email template, need help

DrByte:

No, there is not presently any admin-based tool for this.
The 15 email template files can generally be edited quite easily, often with a bit of copy-and-paste.

thank you for your response :smile:

I found one admin-based tool from conceptlaboratory.com/email-templates-pro.php but its not free.

13 Aug 2009, 12:46 AM
#17
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

Re: How to modify email template, need help

I am trying to add one line into the emails that are sent after an order is placed. I edited the includes/languages/english/checkout_process and a few other files with

define('EMAIL_SUPPORT,' 'all my text i want to display in the email goes here');

and I added $EMAIL_SUPPORT in the email_template_checkout.html file. I followed the format the everything else was in, however the text I defined in the language file is not actually showing up in the email. It's just showing $EMAIL_SUPPORT instead.:shocking:

18 Aug 2009, 12:01 PM
#18
fergusmacdonald avatar

fergusmacdonald

Zen Follower

Join Date:
Oct 2007
Location:
Edinburgh, Scotland
Posts:
243
Plugin Contributions:
0

Re: How to modify email template, need help

Hi,

I want to add some line breaks to the body of text in the welcome email

/includes/languages/english/create_account.php

define('EMAIL_TEXT', 'With your account, you can now make use of some great services we offer:' . "\n\n" . '<li><strong>3 Great Sites</strong> - Your account already works on all our online stores, so you only need to log in once to shop in them all.' . "\n\n" . '<li><strong>Single Cart</strong> - Your shopping cart will transfer between our stores, without losing any products placed in it. If you log out, everything in your cart will be saved until the next time you log in.' . "\n\n" . '<li><strong>Address Book</strong> - You can store up to 5 addresses so that you can have orders sent to your home or work address, or directly to a friend as a present.' . "\n\n" . '<li><strong>Order History</strong> - View your history of purchases that you have made with us.' . "\n\n" . '<li><strong>Products Reviews</strong> - Share your opinions on products with our other customers.' . "\n\n");
define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");
define('EMAIL_GV_CLOSURE','Regards,' . "\n\n" . STORE_OWNER . "\nStore Owner\n\n". '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'.HTTP_SERVER . DIR_WS_CATALOG ."</a>\n\n");

This displays as:

With your account, you can now make use of some great services we offer:

3 Great Sites - Your account already works on all our online stores, so you only need to log in once to shop in them all.

Single Cart - Your shopping cart will transfer between our stores, without losing any products placed in it. If you log out, everything in your cart will be saved until the next time you log in.

Address Book - You can store up to 5 addresses so that you can have orders sent to your home or work address, or directly to a friend as a present.

Order History - View your history of purchases that you have made with us.

Products Reviews - Share your opinions on products with our other customers.

For help with any of our online services, please email the store-owner: [email protected]

However, i'd like to add a line break after each bullet point, but am not sure how to do it.

I've tried adding a <br> tag, and an additional /n but neither worked.

Any help would be much appreciated.