Custom Transactional Emails

Featured Image

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.

19
Top

Enjoyed this post?

Subscribe to our RSS Feed, Follow us on Twitter and spread it to your friends!

Author

Zeljko Prsa

Project Manager / Team Leader

Asides cursing all of the Internet Explorer browser family on a daily basis, Zeljko enjoys his job as a Magento Front-end developer for over two years now.

Other posts from this author

Discussion 19 Comments

Add Comment
  1. 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.

  2. Thanks very much for this, it is very helpful. I was about to start editing the email templates directly before I found your post.

  3. 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.

  4. Stew

    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?

  5. Hey Guys – anybody knows if the email templates will be overwritten with an Magento upograde?

  6. 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?

  7. J

    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?

  8. drenod

    To J: Should help you. System>configuration>sales emails>Send Order Email Copy To

  9. Have you looked into the ability to create sales emails based on the attribute set ordered?

  10. Rahul chaudhari

    how to send email using email template for store wise language ?

  11. Does anyone have a default/original html codes for a new order and shipment for a transactional email? I updated it and now when a customer receives a confirmation, the order/payment box doesn’t show. Any info is appreciated! Thanks!

  12. Peter

    How can I make the emails:

    Order confirmation
    Invoice
    Shipping
    Credit Memo, etc …

    Supported by different languages? When someone orders a product in French or German store view, Magento sends an email with the correct language when i use the default template, but when i add a transactual mail basead on a Magento template and just change my logo, mail, phonenr … Magento dos not translate the email anymore? Any Idea?

    Thanks!!
    Peter

  13. Erwin nelissen

    Hi peter,
    I’ve got the same question. Do you already know the answer?
    Erwin

  14. Peter

    @Erwin

    Hello Erwin,

    quick question: do you speak Dutch?

    Gr’tz,
    Peter

  15. Erwin

    @Peter, ja spreek nederlands.
    heb jij de transactionele e-mails in het Frans.
    Groet Erwin

  16. Peter

    English below

    Dag Erwin,

    ik heb 3 bijkomende taalpakketten geïnstalleerd via Magento Connect “NL, DE, FR” de mailings voor EN,FR,DE zijn perfect in orde maar die van NL zijn echt niet schitterend daarom heb ik de transactionele mails voor NL opnieuw gemaakt en de rest gebruik ik de standaard.
    Vertaalpakketten : voor FR/DE http://www.magentocommerce.com/magento-connect/Gui/extension/364/magento-community-modules–dutch-netherlands-language-pack

    Bijkomend voor NL : MagAddons.com

    I have 3 additional language packs installed via Magento Connect ‘NL, DE, FR “the mailings for EN, FR, DE are perfectly fine but that of NL are really not that great so I have the transactional emails for NL recreated and the rest use I stand.
    Translation Packages: For FR / DE http://www.magentocommerce.com/magento-connect/Gui/extension/364/magento-community-modules–dutch-netherlands-language-pack

    Additional for NL: MagAddons.com

  17. Nice article Zeljko Prsa.
    If you want to customize the new order confirmation template in Magento, you may find this article helpful.
    http://www.webspeaks.in/2011/06/customize-new-order-email-template-in.html

  18. Nick

    Is it possible to add custom attributes to the new order email template?

    For example I am selling records and the name of the record could be ‘Greatest Hits’ and I need to also pull in the artist name which is set as a custom attribute for that product.

  19. Ivn

    My Load default Template List shows blank.

    Also I think when we click on ‘Add new Template’ there should be other fields like ‘Template Name’ ‘Template Content’ ‘Locale’, etc.

    But I just find this ‘Load default Template’ drop-down which also shows blank.

    What should I check in order to get it populated with default email templates?

Add Your Comment

Please wrap all source codes with [code][/code] tags.
Top