Custom Transactional Emails
9 Comments 24th FEB 2009 | Posted by Željko Prša in Magento

Since transactional emails are very important for the process of online shopping you need to have them set up just the you want them and the default templates just don’t cut it. You need your own logo, email data and custom verbiage to be consistent with the image of your company.
Here how it’s done :
1. Creating custom transactional e-mails via Admin
a) In the admin panel of your magento installation go to: System->Transactional Emails
You’ll be presented with a list of default emails. You’ll need to create a custom email so the only way to avoid writing our custom templates from scratch is to use the existing code of the template.
Hint: If you want to see the template before copying, first click on the “Preview” button on the right.
b) To create the new template click on the “Add new template” above the “Transactional Emails” list. This is the part where Magento helps you with the option to load a deafult template for you to customize. Nice feature indeed.
Once you have loaded the deafult template give it a unique name under the “Template name” input field by adding a prefix of your own but leaving the deafult name as well. Example: ” mysite :: New account “.
That way you can easily spot them in the long list of default and custom emails.
Afterwards you can easily customize the verbiage and styling within the “Template subject” and “Template content”.
The “Template content” is the body of the message that the user will recieve upon transaction so be sure to change the E-mail, name of the company etc. You’ll need to upload the logo of your company in the images folder of the skin you’re using.
Once you are done with editing, save the changes and repeat the process for the rest of the email templates.
2. Assigning the templates to different stores and storeviews
Assigning is the easiest part. Just go to the System > Configuration > Sales > Sales Emails and select the corresponding template minding the configuration scope.
After you’re done with setting your new templates save the configuration by clicking on the “Save config”.
That’s it. Wise thing to do now would be to check how the emails look when received so make a test purchase to verify everything is the way it should be.
To post code in comments, place your code inside [code] and [/code] tags.


















May 29th, 2009 at 4:37
Good advice, this is a key area that unfortunately could be less tedious I think.
For me I started with some good advice on the magento forums and created a couple of static CMS blocks for the logo and contact details (email, phone).
Then, due mainly to time constraints, I directly edited the templates located at /app/local/en_US/template/email/sales replacing the text with my static block references
{{block type=”cms/block” block_id=”email_logo_retail”}}
I’m relatively new to magento so not sure about these being written over with any upgrades. Also, when I tested the creation of a custom email from the admin panel as described above I could not find where it is stored and gave up in short order so maybe I will yet discover where they are (right now I suspect in the db?).
Nevertheless, it was much easier to do a search and replace through the files than use the admin panel and having the static blocks means that if I need to change the contact phone number it’s just once in the CMS. Note that the same search and replace does not work in all the templates as some have a “<div style=…” while other have a “<style body, td”
By the way I made blocks for style, logo, contact, and signature. Again, I got the block idea from the mag forum and hope someone else here might find it helpful.
August 4th, 2009 at 10:52
Thanks very much for this, it is very helpful. I was about to start editing the email templates directly before I found your post.
August 22nd, 2009 at 20:45
Excellent idea about the static blocks. This way if the logo changes or the phone or anything else, all you have to do is change the static block.
Genius.
September 13th, 2009 at 18:05
I thought it was an excellent idea, but doesn’t seem to work for me. If I copy the ‘block’ code ( {{block type=”cms/block” block_id=”email_logo_retail”}} ) to my homepage it works but not in an email template.
I’m running more than one store, maybe that’s something to do with it? I did make sure my static block is available to all stores.
Anyone got any ideas?
January 29th, 2010 at 21:48
Hey Guys – anybody knows if the email templates will be overwritten with an Magento upograde?
March 16th, 2010 at 18:39
I personally find this bit tedious as you have to create the new templates and search though the admin to figure out where to assign these and it can be difficult to know you’ve re-assigned them all (some are in Sales Emails, some are in Customer Configuration, others in Payments etc).
Previously I’ve edited the templates as R Graham mentioned (bad I know) but it’s the easiest way I’ve found to make sure I get them all.
Does anyone know where to find a definitive list of which email templates are assigned where?
April 28th, 2010 at 21:55
Hey, I’m trying to add more than one recepients to the Contact Us e-mail form. Do you know how I would go about doing that in the back end?
I tried adding two in the Configuration – > Contacts settings, but it’s not working. Any special way I have to enter it?
May 4th, 2010 at 14:10
To J: Should help you. System>configuration>sales emails>Send Order Email Copy To
July 13th, 2010 at 7:20
Have you looked into the ability to create sales emails based on the attribute set ordered?