I'm trying to figure out how to load a different footer on the invoice emails.

The default footer will be loaded with:

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

This will load the template from /MY-THEME/Magento_Email/email/footer.html.

In my invoice template I would like to load:

{{template config_path="design/email/footer-invoice_template"}}

For this I have created a tempate: /MY-THEME/Magento_Email/email/footer-invoice.html.

But it isn't that easy.

What would be the best way to do this?

  • Alternatively you can put footer code directly in your invoice template. Commented May 1, 2017 at 8:57
  • @SHPatel added my answer. Commented May 1, 2017 at 10:12
  • @Pierre check and let me know your result Commented May 1, 2017 at 10:13
  • @MineshPatel, Your answer makes sense. I will try it coming week.
    – Pierre
    Commented May 2, 2017 at 13:12

2 Answers 2


Email Template in magento work based on 2 values.

your template must be there in xml file OR in database.

For the first approach, You need to define and create your own email template for this in your custom module .for example etc/email_templates.xml from Module module-email

<?xml version="1.0"?>
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="design_email_header_template" label="Header" file="header.html" type="html" module="Magento_Email" area="frontend"/>
    <template id="design_email_footer_template" label="Footer" file="footer.html" type="html" module="Magento_Email" area="frontend"/>

and template under module-email/view/frontend/email


i have checked by dirty trick

Create new template from admin panel and grab value of id (increment id)

after that inserted entry in core_config_data

INSERT INTO `core_config_data` (`config_id`, `scope`, `scope_id`, `path`, `value`) VALUES (NULL, 'default', '0', 'design/email/footer-invoice_template', 'increment id');

in above case i have added increment id as 2 which is template id from DB which i have created

now you can place your template in any email

{{template config_path="design/email/footer-invoice_template"}}

it should work.


First create your template under your custom module


Second to load the template from configuration


<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="footer_invoice_template" label="Footer" file="footer_invoice_template.html" type="html" module="Vendor_MyModule" area="frontend"/>

third to use that footer invoice template in our templates with one single line add this line of code under


<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">

suppose if you want load this template into another template,just

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

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.