{"id":17873,"date":"2022-05-20T13:57:52","date_gmt":"2022-05-20T11:57:52","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=17873"},"modified":"2026-05-07T19:23:30","modified_gmt":"2026-05-07T17:23:30","slug":"customize-email-templates-in-magento-2","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/customize-email-templates-in-magento-2.html","title":{"rendered":"How to Edit Magento 2 Email Templates via Admin Panel In 2026"},"content":{"rendered":"\n<p>Ready to send out exclusive emails? The power is in your hands with Magento email templates. In this comprehensive guide, we&rsquo;ll walk you through everything you need to know to create a custom email template through the admin panel.<\/p>\n<p><!--more--><\/p>\n<p>You&rsquo;ll control every step, from understanding dynamic data to mastering the admin panel.<\/p>\n<p><strong>Table of Contents<\/strong><\/p>\n<p><a href=\"#step_1\">Magento 2 email template layout overview<br>\n<\/a><a href=\"#step_2\">How to customize Magento 2 email templates in the admin panel<br>\n<\/a><a href=\"#step_3\">How to configure dynamic data for the Magento 2 email template<br>\n<\/a><a href=\"#step_4\">How to edit the files of Magento 2 email templates<br>\n<\/a><a href=\"#step_5\">Summing Up<\/a><\/p>\n<div class=\"acf-field acf-field-message acf-field-656df8b232398\">\n<div class=\"acf-input\">\n\n<div class=\"request__platform\">\n    <picture>\n        <source srcset=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-srcset=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/07\/small-devices-sales.jpg\" media=\"(max-width: 640px)\" class=\"lazy\"><\/source>\n        <source srcset=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-srcset=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2023\/12\/bg_request_magento.png\" media=\"(min-width: 641px)\" class=\"lazy\"><\/source>\n        <img decoding=\"async\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2023\/12\/bg_request_magento.png\" class=\"lazy\" width=\"786\" height=\"300\" loading=\"lazy\" alt=\"bg request magento\" title=\"Request block (Platform)\">\n    <\/picture>\n    <div class=\"content_part\">\n        <span class=\"title h3\"> Customize your email templates <\/span>\n        <span class=\"sales_after_content_text\">Contact us and discuss the design implementation for your email templates.<\/span>\n        <a href=\"https:\/\/belvg.com\/contact\" data-link class=\"contact_with_sales call-to-action\" target=\"_blank\">\n            Get Started        <\/a>\n    <\/div>\n<\/div>\n\n<style>.request__platform { position: relative; } .request__platform .content_part { position: absolute; top: 50%; left: 0; margin: 0 calc(var(--belvg-space__base) * 3); max-width: 50%; transform: translateY(-50%); } .request__platform img { width: 100%; object-fit: cover; } @media screen and (max-width: 640px) { .request__platform img { min-height: 250px; } .request__platform .content_part { color: var(--belvg-color__white); text-align: center; left: 50%; transform: translate(-50%, -50%); width: 100%; max-width: unset; padding: 0 var(--belvg-space__md); } } <\/style>\n\n<\/div>\n<\/div>\n<h2 id=\"step_1\">Magento 2 Email Template Layout Overview<\/h2>\n<p>When creating a Magento email template, it&rsquo;s crucial to remember that users can open your email with any app or device. Understanding this layout overview is the key to ensuring your emails are displayed correctly across all platforms.<\/p>\n<p>Mail programs can add styles besides those a developer initially chose for email distribution. A large variety of mail software and render engines makes it necessary for us to opt for a one-size-fits-all approach. You need to follow specific rules to ensure that your emails will be displayed correctly on different devices. Here are some of them:<\/p>\n<ul>\n<li>Use table-layout (<code><b>&lt;table&gt;<\/b><\/code> instead of <code>&lt;div&gt;<\/code>)<\/li>\n<li>Do not shorten the HEX codes for colors (<strong>#FFFFFF<\/strong> instead of #FFF)<\/li>\n<li>Use <strong>CSS2 properties<\/strong> instead of CSS3<\/li>\n<li>Use <strong>HTML4<\/strong> instead of HTML5<\/li>\n<li>Use <strong>background-color<\/strong> instead of background. You should also use the extended properties like <strong>padding-top<\/strong>, <strong>padding-left,<\/strong> and others<\/li>\n<li>Use <strong>background color<\/strong> instead of background images and add visual elements using the <strong><img alt=\"\" title=\"Request block (Platform)\"><\/strong> tag<\/li>\n<li>Use the <strong>HTML attributes<\/strong> instead of CSS<\/li>\n<li>Add inline <strong>CSS styles<\/strong> in your layout<\/li>\n<li>Use <strong>standard system fonts<\/strong> for email content display<\/li>\n<\/ul>\n<p>Follow the guidelines above to ensure Magento 2 email templates display correctly across all email clients. This helps maintain consistency and proper rendering of emails on various platforms.<\/p>\n<h2 id=\"step_2\">How to Customize Magento 2 Email Templates in the Admin Panel<\/h2>\n<p>If you want to customize email templates, find the Magento email templates&rsquo; location and edit them via the admin panel. Go to <strong>Admin Panel -&gt; Marketing -&gt; Email Templates.<\/strong><\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/unnamed.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/unnamed.webp\" alt=\"unnamed\" width=\"512\" height=\"462\" class=\"lazy aligncenter size-full wp-image-28274\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>You will see the custom Magento 2 email templates created earlier in your store. To edit them, you just need to choose the one you want to change. You can filter them by the date templates were added or updated and choose the template type.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/2.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/2.webp\" alt=\"2\" width=\"512\" height=\"288\" class=\"lazy aligncenter size-full wp-image-28275\" title=\"Request block (Platform)\"><\/a><\/p>\n<h3>Magento Email Template Creation<\/h3>\n<p>Remember that we cannot change the original template; we create a new one based on the default Magento emails we found.<\/p>\n<p>Now, let&rsquo;s learn how to create a custom version and then how to replace the standard template with the one you made.<\/p>\n<p>When you have found the location of email templates, you need to choose one from which you will create your own. To do&nbsp;this, click on <strong>Add New Template<\/strong>. Here, you will see a field for selecting a default template to customize and fill in its content.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/the-list-of-templates.webp\" alt=\"the list of templates\" width=\"1394\" height=\"783\" class=\"lazy aligncenter size-full wp-image-28297\" title=\"Request block (Platform)\"><\/p>\n<p>Here, you can edit your templates by customizing Magento&rsquo;s default ones from scratch or changing content to your existing templates that were created earlier.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/image.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/image.webp\" alt=\"image\" width=\"1883\" height=\"851\" class=\"lazy aligncenter size-full wp-image-28309\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In the <strong>Template Name<\/strong> field, you must enter the name for template identification in the Magento admin panel.<\/p>\n<p>In the <strong>Template Subject<\/strong> field, you should add simple text that will be used as the subject of a letter. This field may contain system variables.<\/p>\n<p>In the <strong>Template Content<\/strong> field, you create content for your letter. You can also use system variables in this field. When creating content, follow the rules listed in this section.<\/p>\n<p>The <strong>Template Styles<\/strong> field is not obligatory; here, you can edit email template styles by adding CSS styles to the modified template.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/image-1.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/image-1.webp\" alt=\"image 1\" width=\"1892\" height=\"856\" class=\"lazy aligncenter size-full wp-image-28310\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Also, admins can access Magento 2 email template variables in the layout. For example, it can be a phone number, a country, or a region. How to add them we described in the <em>third guide section<\/em>.<\/p>\n<p>When you finish the customization, press <strong>Save Template<\/strong>. Now, you have a new template that has yet to be <strong>used anywhere<\/strong>.<\/p>\n<h4>How to Choose the Customized Theme<\/h4>\n<p>You now have a template, but you can&rsquo;t use it yet. To do this, you need to add it to the storeview settings. Here&rsquo;s what you should do.<\/p>\n<p>Click on <strong>Stores &gt; Settings &gt; Configuration.<\/strong><\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/stores-configuration.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/stores-configuration.webp\" alt=\"stores configuration\" width=\"415\" height=\"555\" class=\"lazy aligncenter size-full wp-image-28282\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Then, in the <strong>Sales <\/strong>section, you need to select <strong>Sales Emails<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/sales-emails.webp\" alt=\"sales emails\" width=\"1600\" height=\"763\" class=\"lazy aligncenter size-full wp-image-28283\" title=\"Request block (Platform)\"><\/p>\n<p>Select the storefront where you want to apply your new template from step 1. In the&nbsp;<strong>Default Config&nbsp;<\/strong>drop-down list, we select the storefront for the change.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/default-config.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/default-config.webp\" alt=\"default config\" width=\"1600\" height=\"697\" class=\"lazy aligncenter size-full wp-image-28284\" title=\"Request block (Platform)\"><\/a><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/configurations.webp\" alt=\"configurations\" width=\"438\" height=\"796\" class=\"lazy aligncenter size-full wp-image-28285\" title=\"Request block (Platform)\"><\/p>\n<p>For example, you have created an email template for new orders. Select the latest Magento 2 custom email template you created in Step 1 in the&nbsp;<strong>New Order Confirmation Template&nbsp;<\/strong>drop-down list.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/new-order-template.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/new-order-template.webp\" alt=\"new order template\" width=\"1600\" height=\"697\" class=\"lazy aligncenter size-full wp-image-28286\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Click on <strong>Save Configuration<\/strong>.<\/p>\n\n<h3>How to Customize the Header and the Footer of Magento 2 Email Template<\/h3>\n<p>You can create a header and a footer template for your Magento 2 email templates. Let&rsquo;s see how they are displayed in a default New Order template first:<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/header-code.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/header-code.webp\" alt=\"header code\" width=\"1600\" height=\"726\" class=\"lazy aligncenter size-full wp-image-28289\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Directives <code>{{template config_path=\"design\/email\/header_template\"}}<\/code> and <code>{{template config_path=\"design\/email\/footer_template\"}}<\/code> are used for the default header and footer in all Magento templates. You can&rsquo;t delete them.<\/p>\n<p>If you want to customize a Magento 2 email footer or header template,<strong> chooseFooter<\/strong> or <strong>Header<\/strong> in <strong>Templates -&gt; Magento_Email<\/strong> and press <strong>Load Template<\/strong>.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/12\/configuration-magento-2-email-template.png\"><\/a><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/footer-template.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/footer-template.webp\" alt=\"footer template\" width=\"1600\" height=\"725\" class=\"lazy aligncenter size-full wp-image-28288\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>In Template Content, the HTML code for customization will appear. Here you can add several columns, necessary links, or a phone number by entering the required code. Remember to enter names in the <strong>Template Name<\/strong> field.<\/p>\n<p>To save a template, you need to press <strong>Save Template<\/strong>.<\/p>\n<h4>How to Choose the Header or Footer Template for the Email Template<\/h4>\n<p>There is a configuration setting for all the templates created, where you can choose parts of a template to display.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/content-configuration.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/content-configuration.webp\" alt=\"content configuration\" width=\"393\" height=\"875\" class=\"lazy aligncenter size-full wp-image-28290\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Here, you can see your website, its variants, and the theme that was chosen for each.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/theme-name.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/theme-name.webp\" alt=\"theme name\" width=\"1600\" height=\"523\" class=\"lazy aligncenter size-full wp-image-28291\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Advanced theme settings, such as changing Magento 2 email header template, a footer one, or logo, are located in the design configuration section. You will not find them in the store configuration. Click <strong>Edit<\/strong> to open settings.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/edit-storefront.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/edit-storefront.webp\" alt=\"edit storefront\" width=\"1600\" height=\"523\" class=\"lazy aligncenter size-full wp-image-28292\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>First, you will see the theme that was applied to the chosen website.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/applied-theme.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/applied-theme.webp\" alt=\"applied theme\" width=\"1600\" height=\"567\" class=\"lazy aligncenter size-full wp-image-28293\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Scroll down and open <strong>Transactional Emails<\/strong>.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/transactional-emails.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/transactional-emails.webp\" alt=\"transactional emails\" width=\"1600\" height=\"716\" class=\"lazy aligncenter size-full wp-image-28294\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Here, you can choose the template for the Header or Footer you&rsquo;ve created previously.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/choosing-the-template.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/choosing-the-template.webp\" alt=\"choosing the template\" width=\"1600\" height=\"702\" class=\"lazy aligncenter size-full wp-image-28295\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Click <strong>Save Configuration<\/strong>.<\/p>\n\n<h2 id=\"step_3\">How to Configure Dynamic Data for the Magento 2 Email Template<\/h2>\n<p>We already mentioned directives and variables in our guide. They can be used to customize your email templates and simplify working with them.<\/p>\n<p>For example, one of the main things that is almost always added to the email is the domain name. If you add this link as a simple HTML tag, it will work. Of course, as your business grows and expands over time, you&rsquo;ll add a few new domains. In this case, you must manually change this link in all the templates. It will be quite a challenge if you have more than a hundred of them.<\/p>\n<p>For such tasks, Magento 2 email templates support directives and variables.<\/p>\n\n<p>You can enter a directive with a domain name. If the domain changes, the information in the letter also changes without the admin&rsquo;s manual work. A directive is inserted in a template with two curly braces opening and closing one.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/directives.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/directives.webp\" alt=\"directives\" width=\"1600\" height=\"661\" class=\"lazy aligncenter size-full wp-image-28296\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Let&rsquo;s take a look at some of them.<\/p>\n<p>A directive store can add a link to the current store. If you leave the URL value empty, the address of the current store will be filled out automatically.<\/p>\n<p><code>{{store url = \"\"}}<\/code><\/p>\n<hr>\n<p>The <strong>var <\/strong>directive is used to insert Magento 2 email template variables.<\/p>\n<p><code>{{var customer.name}}<\/code><\/p>\n<hr>\n<p>The directive of Magento 2 email templates is often used to format the header and footer in the same style. The path to a template is applied with the help of <strong>config_path<\/strong> attribute.<\/p>\n<p><code>{{template config_path = \"design \/ email \/ header_template\"}}<\/code><\/p>\n<hr>\n<p>If you need to display basic static content, then it is necessary to use <strong>translation <\/strong>of <strong>trans <\/strong>directive.<\/p>\n<p><code>{{trans \"Example string\"}}<\/code><\/p>\n<hr>\n<p>To add an image link to the corresponding image in Magento 2 email templates, use the <strong>media <\/strong>directive. It extracts the path to the file from the <strong>media <\/strong>folder.<\/p>\n<p><code>{{media url = \"\/pathToImage\/img.jpg\"}}<\/code><\/p>\n<hr>\n<p>There are two directives to add Magento 2 email template styles:&nbsp;<strong>CSS<\/strong>&nbsp;and&nbsp;<strong>inline CSS<\/strong>.&nbsp;The CSS directive extracts CSS from a file, so you must add the &lt;style&gt; &lt;\/ style&gt; tag. You can also add styles from a variable with an extra modifier raw. It allows you to insert them without looking through the HTML tags and CSS.<\/p>\n<pre class=\"lang:default decode:true\">&lt;style type = \"text \/ css\"&gt;\r\n{{css file = \"css \/ email.css\"}} or {{var template_styles | raw}} \r\n&lt;\/ style&gt;<\/pre>\n<p>The inlinecss directive unpacks styles and places them inside of inline tags, as appears from the name:<\/p>\n<p><code>{{inlinecss file = \"css \/ filename.css\"}}<\/code><\/p>\n<p>We showed only the most common directives. When you upload the original template for editing, you will encounter many variables. They will depend on the objects passed in the template.<\/p>\n<h3>Customization with Variables<\/h3>\n<p>Also, you can customize your email templates with the help of variables. There are two types of them: predefined and custom ones.<\/p>\n<h4>The Use of Predefined Variables<\/h4>\n<p>Magento offers a variety of predefined variables that can help you customize your templates. All the available variables will be shown when you go to Marketing -&gt;&nbsp;<strong>Email Templates<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/unnamed.webp\" alt=\"unnamed\" width=\"512\" height=\"462\" class=\"lazy aligncenter\" title=\"Request block (Platform)\"><\/p>\n<p>Here, click <strong>Add New Template<\/strong>.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/the-list-of-templates.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/the-list-of-templates.webp\" alt=\"magento transactional email\" width=\"1394\" height=\"783\" class=\"lazy aligncenter wp-image-28297 size-full\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>And click <strong>Insert Variable<\/strong>.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/insert-variable.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/insert-variable.webp\" alt=\"insert variable\" width=\"1600\" height=\"694\" class=\"lazy aligncenter size-full wp-image-28298\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>The whole list of allowed predefined variables will be shown.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/the-list-of-variables.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/the-list-of-variables.webp\" alt=\"the list of variables\" width=\"731\" height=\"899\" class=\"lazy aligncenter size-full wp-image-28299\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>When you choose a variable from the list, it will appear in the <strong>Template Content<\/strong> field. We chose the Country variable in the New Order template in the example below.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/country-id-variable.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/country-id-variable.webp\" alt=\"magento 2 transactional emails\" width=\"1600\" height=\"667\" class=\"lazy aligncenter wp-image-28300 size-full\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>After editing the template, click <strong>Save Template<\/strong>.<\/p>\n<h4>The Use of Custom Variables<\/h4>\n<p>If you have some specific data to add to your Magento 2 email templates, you can create custom variables for personalization yourself. It can be contact information or promotional messages. First, go to <strong>System -&gt; Other Settings -&gt; Custom Variables<\/strong>.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/custom-variables.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/custom-variables.webp\" alt=\"custom variables\" width=\"678\" height=\"837\" class=\"lazy aligncenter size-full wp-image-28301\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Here the list of created custom variables are displayed. Click <strong>Add New Variable<\/strong>.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/add-new-variable.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/add-new-variable.webp\" alt=\"add new variable\" width=\"1600\" height=\"589\" class=\"lazy aligncenter size-full wp-image-28302\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Let&rsquo;s create a variable to display a registered address. Enter the information about new variable:<\/p>\n<p><strong>Variable Code<\/strong> &ndash; enter the code of the new variable. It is used in templates to refer to the variable.<\/p>\n<p><strong>Variable Name<\/strong> &ndash; add the name of the new variable.<\/p>\n<p><strong>Variable HTML Value<\/strong> &ndash; enter the information that you want to save for the variable. It can be text, numbers, or HTML content.<\/p>\n<p><strong>Variable Plain Value<\/strong> &ndash; enter the text from the previous field without formatting.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/save-variable.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/save-variable.webp\" alt=\"save variable\" width=\"1600\" height=\"670\" class=\"lazy aligncenter size-full wp-image-28303\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Click <strong>Save<\/strong> to save the variable. To add the custom variable to your email template, go to <strong>Marketing -&gt; Email Templates -&gt; Choose the existing template<\/strong> or Add <strong>New Template<\/strong>. Click <strong>Insert Variable<\/strong> and scroll down to <strong>Custom Variables<\/strong>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/show-custom-variable.webp\" alt=\"magento transactional email templates\" width=\"605\" height=\"905\" class=\"lazy aligncenter wp-image-28304 size-full\" title=\"Request block (Platform)\"><\/p>\n<p>Choose your created template. It will appear in the&nbsp;<strong>Template Content&nbsp;<\/strong>section, like here:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/reg-address-var.webp\" alt=\"reg address var\" width=\"1600\" height=\"706\" class=\"lazy aligncenter size-full wp-image-28305\" title=\"Request block (Platform)\"><\/p>\n<p>After making all the changes, click&nbsp;<strong>Save Template<\/strong>.<\/p>\n<h2 id=\"step_4\">How to Edit the Files of Magento 2 Email Templates<\/h2>\n<p>If you have code knowledge, here is another way to customize Magento 2 email templates.<\/p>\n<p>In Magento 2, email templates are stored at &lt;module_dir&gt; \/ view \/ &lt;area&gt; \/ email catalogs of the appropriate modules. It is not recommended to change Magento 2 standard files. Instead, you&rsquo;d better create own templates. To do it, you can make the necessary files in your theme or with the help of Magento Admin.<\/p>\n<p>Let&rsquo;s see how to put a file in a theme and open it for customization in this theme. To do this, you need to find the original file, which needs to be customized individually only for the current theme.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/code-1.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/code-1.webp\" alt=\"email template magento 2\" width=\"1600\" height=\"797\" class=\"lazy aligncenter wp-image-28306 size-full\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>Insert only the template required for the current customization into the theme.<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/code-2.webp\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2020\/05\/code-2.webp\" alt=\"code 2\" width=\"1600\" height=\"362\" class=\"lazy aligncenter size-full wp-image-28307\" title=\"Request block (Platform)\"><\/a><\/p>\n<p>The structure is similar to editing a template with the help of the admin panel. In this case, the subject of the email is transferred to the <strong>@subject<\/strong> directive.<\/p>\n<h2 id=\"step_5\">Summing Up<\/h2>\n<p>Mastering the editing of Magento 2 email templates is a vital skill for anyone in the ecommerce industry. This guide offers you practical techniques to implement templates to your website and effectively engage your audience. Understanding template structures, leveraging variables, and using HTML and CSS judiciously are vital components. Using all the features of Magento, you can elevate your email marketing strategies and achieve success in your online ventures.<\/p>\n<div class=\"acf-field acf-field-message acf-field-656de52505dd5\">\n<div class=\"acf-input\">\n\n<div class=\"after_content__request\" style=\"background-color:\">\n    <div class=\"content_part\">\n        <span class=\"title h3\">\n                    <\/span>\n        <span class=\"sales_after_content_text\">\n                    <\/span>\n        <a href=\"https:\/\/belvg.com\/contact?utm_source=blog&amp;utm_campaign=request_&amp;utm_content=bottom%20\" data-link class=\"contact_with_sales call-to-action\" target=\"_blank\">\n             Get started <\/a>\n    <\/div>\n<\/div>\n\n<style>.after_content__request .title { margin-bottom: var(--belvg-space__md); } .after_content__request .content_part { margin: 0; padding: var(--belvg-space__2xl) clamp(var(--belvg-space__md), 10vw, 100px); justify-content: center; text-align: center; } <\/style>\n\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"Ready to send out exclusive emails? The power is in your hands with Magento email &#8230;","protected":false},"author":42,"featured_media":28272,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,491,389,469,540,473,539,524],"tags":[],"class_list":["post-17873","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento","category-magento-2","category-magento2-development","category-magento2-tutorial","category-magento-email-integration","category-magento-front-end-developer","category-magento-marketing-integration","category-magento-speed-optimization","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/?custom_blocks=request-block-platform\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/?custom_blocks=request-block-platform#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"position\":2,\"name\":\"Magento\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customize-email-templates-in-magento-2.html#listItem\",\"name\":\"How to Edit Magento 2 Email Templates via Admin Panel In 2026\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/customize-email-templates-in-magento-2.html#listItem\",\"position\":3,\"name\":\"How to Edit Magento 2 Email Templates via Admin Panel In 2026\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento#listItem\",\"name\":\"Magento\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/?custom_blocks=request-block-platform#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/?custom_blocks=request-block-platform\",\"name\":\"Request block (Platform) | BelVG Blog\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/?custom_blocks=request-block-platform#breadcrumblist\"},\"datePublished\":\"2023-12-01T17:48:24+02:00\",\"dateModified\":\"2023-12-04T19:12:57+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Request block (Platform) | BelVG Blog","description":"","canonical_url":"https:\/\/belvg.com\/blog\/?custom_blocks=request-block-platform","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/?custom_blocks=request-block-platform#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","position":2,"name":"Magento","item":"https:\/\/belvg.com\/blog\/category\/magento","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/customize-email-templates-in-magento-2.html#listItem","name":"How to Edit Magento 2 Email Templates via Admin Panel In 2026"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/customize-email-templates-in-magento-2.html#listItem","position":3,"name":"How to Edit Magento 2 Email Templates via Admin Panel In 2026","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento#listItem","name":"Magento"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/?custom_blocks=request-block-platform#webpage","url":"https:\/\/belvg.com\/blog\/?custom_blocks=request-block-platform","name":"Request block (Platform) | BelVG Blog","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/?custom_blocks=request-block-platform#breadcrumblist"},"datePublished":"2023-12-01T17:48:24+02:00","dateModified":"2023-12-04T19:12:57+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"17873","title":"How to Edit Magento 2 Email Templates in 2026 | #site_title","description":"Learn the essentials of Magento 2 custom email template practice. This guide covers editing techniques, best practices, and tips for seamless email integration.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:36:58","updated":"2026-11-03 18:36:58"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento\" title=\"Magento\">Magento<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Edit Magento 2 Email Templates via Admin Panel In 2026\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento","link":"https:\/\/belvg.com\/blog\/category\/magento"},{"label":"How to Edit Magento 2 Email Templates via Admin Panel In 2026","link":"https:\/\/belvg.com\/blog\/customize-email-templates-in-magento-2.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/17873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=17873"}],"version-history":[{"count":29,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/17873\/revisions"}],"predecessor-version":[{"id":30539,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/17873\/revisions\/30539"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/28272"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=17873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=17873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=17873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}