I see in transactional email New order template, there is this tag that calls the header html file which is in app/locale/en_US/template/email/html

{{template config_path="design/email/header"}}

I wish to create a new header so I created new file app/local/en_US/template/email/html/header2.html and use code

{{template config_path="design/email/header2"}}

but it does not work. With this code, no header is included in the email. Any ideas why or what is the proper way to create a custom email header?

  • 1
    do you have a header defined under the config path design/email/header2 Commented May 14, 2015 at 4:54
  • Yes, I do. I believe the correct path is. app/local/en_US/template/email/html/header2.html.
    – Justin Lok
    Commented May 14, 2015 at 17:24

4 Answers 4


You can also implement the class default Magento to work with multiple (headers and footers).

Create file:


 * Magento
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 * @category    Mage
 * @package     Mage_Adminhtml
 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

 * Adminhtml config system template source
 * @category   Mage
 * @package    Mage_Adminhtml
 * @author      Magento Core Team <[email protected]>
class Mage_Adminhtml_Model_System_Config_Source_Email_Template extends Varien_Object
     * Config xpath to email template node
    const XML_PATH_TEMPLATE_EMAIL = 'global/template/email/';

     * Generate list of email templates
     * @return array
    public function toOptionArray()
        if(!$collection = Mage::registry('config_system_email_template')) {
            $collection = Mage::getResourceModel('core/email_template_collection')

            Mage::register('config_system_email_template', $collection);
        $options = $collection->toOptionArray();
        $templateName = Mage::helper('adminhtml')->__('Default Template from Locale');
        $nodeName = str_replace('/', '_', $this->getPath());

        // Implementation for various templates config.
        $templatesNodes = Mage::app()->getConfig()->getNode('global/template/email');
        if(count($templatesNodes)) {
            foreach($templatesNodes as $nodes) {
                foreach($nodes as $code => $config) {
                    if(strpos($code, $nodeName) !== false) {
                        $templateLabelNode = Mage::app()->getConfig()->getNode(self::XML_PATH_TEMPLATE_EMAIL . $code . '/label');
                        if ($templateLabelNode) {
                            $templateName = Mage::helper('adminhtml')->__((string)$templateLabelNode);
                            $templateName = Mage::helper('adminhtml')->__('%s (Default Template from Locale)', $templateName);
                                'value'=> str_replace('/', '_', $code),
                                'label' => $templateName

        return $options;


Then in your custom module, you can use as in the following example in your config.xml:

                <design_email_header_custom_black translate="label" module="custom_module">
                    <label>Email - Header (CUSTOM BLACK)</label>
                <design_email_header_custom_white translate="label" module="custom_module">
                    <label>Email - Header (CUSTOM WHITE)</label>
                <design_email_footer_custom_black translate="label" module="custom_module">
                    <label>Email - Footer (CUSTOM BLACK)</label>
                <design_email_footer_custom_white translate="label" module="custom_module">
                    <label>Email - Footer (CUSTOM WHITE)</label>

So you have these options to select from:

System > Configuration > Design > Transactional Email


This may help explain it:
Use multiple footers for email

What they ask:

Use multiple footers for email

up vote 1 down vote favorite Is it possible to use multiple footers for the Transactional Emails?

So I want to use a specific footer for a new order email, and an other footer for the shipment email.

I currently load the footer with this line: {{template config_path="design/email/footer"}}

How can I load a specific template in the transactional email?


design/email/header This refers to the configuration option NOT the template.

You could create a new module to add the option like so.

                        <header2 translate="label">
                            <label>Email Header Template 2</label>

Alternatively just create a new CMS static block and then insert it on top of your email content like so.

{{block type="cms/block" block_id="email-header-sales" }}


{{template config_path="design/email/header"}}
  • I needed to allow cms/block under System -> Permissions -> blocks Commented Oct 20, 2017 at 20:26

Also you need to modify code in app/code/core/Mage/Core/etc/config.xml

                <design_email_header translate="label" module="core">
                    <label>Email - Header</label>
                    <file>html/header2.html(your file name)</file>

Instead of doing this in core file, try to do this in your custom module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.