How to Customize Magento Email Templates

Email templates are located in the default directory at app/locale//template/email.

Note! Don’t edit them directly in the filesystem via the code base, because any Magento update will override all your changes. In case you want to edit here, consider the protection and merging when upgrade.

A better way is to customize email templates via System - Transactional Emails.

1. Hit the Add New Template button;
2. Choose the default template from the drop-down;
3. Click on the the Load Template button.

When the HTML code appears, customize the template’s content as you need: change the text, add new variables, modify the entire styling.

To insert variables, place the cursor in the code where you want a variable to appear and hit the Insert Variable button. There are 2 types of variables in Magento:

1. System (aka predefined) Magento variables 2. Custom Magento variables.

System Variables

There are a number of system variables available for email templates. Some of them are global (like store URL/name) and some are specific. System variables are replaced by the corresponding content from the Configuration tab (but not necessarily).

When a variable is inserted into HTML, it is formatted as a markup-tag and enclosed in double curly braces. For example, {{ store url =“"}}.

Custom Variables

Custom variables can hold both HTML and plain text. To create such a variable, go to
System - Custom Variables and hit the Add New Variable button.

Here, you need to set up the following:

  • Variable Code: all lowercase, no spaces characters (e.g, workinghours)
  • Variable Name: enter a name used for internal reference (e.g, Working Hours)
  • Variable HTML Value: enter any content here, using basic HTML tags (e.g, 11am - 7pm (GMT +3) 5 Days a Week)
  • Variable Plain Value: enter the plain text (11am-7pm (GMT +3) 5 Days a Week)
  • When done, you will see the newly added custom variable in the default list.

    Magento Email Templates Configuration

    Next step is to tell Magento that you need to send a custom email template instead of the default one (when a particular action occurs).

    Go to System - Configuration and choose the newly created custom template from the dropdown. For example, if you need to configure a new forget password template, select the Customer Configuration tab Password Options and Save Config.

    The result would look something like that:

    SEO Meta Templates

    Advanced SEO attribute templates to easily optimize product and category page meta data, as well as the short and detailed descriptions.



Submit Comment

* Required Fields