How to Configure The Email Header Template in Magento 2

Posted by

What is Email Header Template in Magento 2?

The Email Header Template in Magento 2 is the content on the top of the email template which is sent automatically as a message from your Magento 2 web store. Logo and store contact are usually included in the email header template, and of course, you can add variables to the header to add store contact information.

Email Templates in Magento 2
Email Templates

Step 1: Load the default template

  1. On the Admin sidebar, click Marketing. In Communications section, select Email Templates.
  2. Click Add New Template, follow these steps:
  • In Load Default Template, open the Template list under Magento_Email, click Header.
Default Header Template Magento 2
Default Header Template
  • Click Load Template to display the template HTML code and variables in the form.

Step 2: Customize the Template

  1. In Template information section, follow these steps:
  • Input the Template Name for your email header template
  • Input the Template Subject so you can arrange the templates later. The subject column can filter and sort the list of templates in the grid.

Header Template Information magento 2

Header Template Information

  • Edit the HTML code as needed in the Template Content box, remember not to overwrite anything that is enclosed in double braces.
  • If you want to insert a variable, place the cursor in the code in the same place that the variable will display, click Insert Variable. Then select the variable you want to insert. After that, the markup tag for the variable is inserted in the code.

Insert Variable Magento 2

    • Insert Variable
  • If you need to add CSS code, enter the code in the Template box
  1. Click Preview Template to review your header template. If you need any adjustment, just edit the template as needed.
  2. Click Save Template when you’re done. Now you can see the custom header displays in the list of available Email templates.

Step 3: Update the configuration

  1. On the Admin sidebar, click Content. After that, in Design section, click Configuration.
  2. In the grid choose the store view that you want to edit. Click Edit
  3. Scroll down and open the Transactions Email.
  4. Select the default Header Template for email notifications.
  5. Click Save Config after completed.

Transactional Emails magento 2

Transactional Emails

Field Descriptions

Template The choice of available templates will be listed, and recognizes the template to be customized
Template Name The name of your custom template.
Insert Variable a Store Contact Information variable can be inserted into the template at the cursor location.
Template Subject In the Subject column, the Template Subject displayed to sort and filter the templates in the list.
Template Content The HTML content of the template.
Template Styles In the Template Styles box, you can enter any CSS style declarations to format the template header .

Leave a Reply

Your email address will not be published. Required fields are marked *