How Change A Magento Template
This entry was posted on Jun 2, 2021.
Finding a perfect e-mail template is the offset step to ship out exclusive emails. In this commodity nosotros volition give yous a guide to edit and customize Magento e-mail templates.
To ensure that your emails volition be displayed correctly on different devices, y'all demand to follow certain rules above:
-
Use table-layout (
<table>
instead of<div>
); -
Do not shorten the HEX codes for colors (#FFFFFF instead of #FFF);
-
UtilizeCSS2 properties instead of CSS3;
-
UseHTML4 instead of HTML 5;
-
Utilisebackground-color instead of groundwork.You should also employ the extended backdrop similarpadding-peak,padding-left and others;
-
Employbackground colour instead of background images and add visual elements using the
tag;
-
Utilise theHTML attributes instead of CSS;
-
Add together inlineCSS styles in your layout;
-
Usestandard system fonts for email content display.
How to edit Magento email templates
Magento email templates are stored at<module_dir> / view / <area> / email catalogs
of the appropriate modules. For example, in the bones module Magento_Customer, you lot can find the following templates:
It is not recommended to change Magento 2 standard files. Instead, you'd better create your own templates. In order to exercise it, you can create necessary files in your theme or with the help of Magento Admin.
In many cases, electronic mail templates consist of the same components. For example, a company'south logo, contact data and some other elements tin can be placed at the top. Phone numbers, social links or others can be placed at the bottom. On the other paw, the place where y'all put the well-nigh significant email's content is not static. It depends on a template that y'all utilise. It is the reason why Magento email templates consist of 3 parts: Header, Content, Footer.
By default, header and footer can located in the following files:
- /view/frontend/email/header.html
- /view/frontend/email/footer.html
How to create a new email template in admin panel
To create a new template, you need to go to theAdmin Panel -> Marketing -> Electronic mail Templates section.
So, click onAdd New Template.
In theTemplate Proper name field, you demand to enter the name for template identification in the Magento admin panel.
In theTemplate Subject area field, you should add simple text that will be used as a bailiwick for emails created with your template. This field may incorporate system variables.
In theTemplate Content field, you create content for your letter. You can also employ system variables in this field. When creating content, you should try to follow the rules listed in section ane.
TheTemplate Styles field is not obligatory to use, here you tin add CSS styles to a template. These styles can be added inside a<style>
tag in the<head>
of a alphabetic character.
Later on you accept filled in the data, click onSave Template. At present, you have a new template which is not used anywhere. To apply this template, y'all need to do the following:
ane. Click onStores > Settings > Configuration
2. Then, in theSales section, yous need to selectSales Emails.
iii. Now, you need to select the section where you want to apply your new template. For example, you have created an email template for new orders. Then, proceed to theClub section and in theNew Lodge Confirmation Template field, you should select your new template and click onSalve Config.
How to edit Magento e-mail templates in admin panel
To create or edit Magento 2 email template via admin panel, you should proceed toAdmin Panel -> Marketing -> Email Templates.
You will see the existingMagento 2 templates. To edit them, you but need to cull the i that you want to edit. You lot tin too create a new template by clicking on Add new template (for details, see section 6).
On the page where you edit a template, you can change the template'southward name every bit well equally the email subject line. And then, in theTemplate Content field, you can edit the content of your template (do not forget to employ tabular array layout and HTML4 tags). In the Template Styles field, you can write CSS for your template.
Also, in the layout of electronic mail templates, Magento 2 allows access to variables. To add a variable to your template, y'all should printing Insert Variable and then choose the necessary variable in the pop-up
Directives{Mistake in template processing}
and{Error in template processing}
connect header and footer templates.
To save a template, you demand to pressSave Template.
How to Customize Magento email templates?
Load the Template
In order to manage the transactional emails in Magento 2 go toAdmin Panel > Marketing > Communications > Electronic mail Templates.
And then, choose an email template yous want to edit or you can add a new one by pressing theAdd New Template push.
When you are adding a new template, delight choose an email template you lot want to base it on in theTemplate field and pressLoad Template button.
Make full in the Template Information
1. Set the name of the template in theTemplate Name field.
2. ChangeTemplate Subject andContent as you wish.
iii. AddTemplate Styles(optional).
Once yous accept finished with the configurations don't forget to press theRelieve Template button.
Assign Electronic mail Template
If y'all have created a new template y'all need to assign it in the store configurations. Equally far as nosotros have created a New Club Template in this guide we becomeAdmin Console > Stores >Setting > Configuration > Sales > Sales Emails(your path tin can be different depending on the template).
Then you demand to notice a template select box you lot are interested in, remove the checkmarkUse system value and choose the template from the list.
Afterwards all of the configurations have been performed printing theSave Config button andaffluent Magento caches.
Customize Email Logo
Finally, in one case you've created the e-mail template and assigned it to the store configurations you need to customize the email logo.
In order to practice this, get toContent > Design > Configuration and choose the configuration scope you want to customize the email logo for.
Later that, move to theTransactional Emails section and fill up out the post-obit fields.
- Upload theLogo Image orSelectfrom theGallery of already uploaded images.
- Set theLogo Paradigm Alt.
- Enter theLogo Width andElevation.Note: it is necessary that you set these characteristics if you uploaded the logo and not selected it from the gallery.
- Choose theHeader and Footer Templates.
- In one case more than, don't forget toSave Configuration when you finish.
In brusque, if you want to customize Magento electronic mail templates yous need to take the post-obit steps:
1st Step: get toMarketing > Email Templatesin guild to edit or add a new electronic mail template.
2nd Step:go to Stores > Configuration >XYZ,find your template select box and alter its value.
3nd Step: go toContent > Design > Configuration to customize the electronic mail logo.
Managing a global-scope website you need to create the language environment for the customers to experience comfy in and communicate with them in their own language. This increases your credibility and improves their feel in your store.
Besides, if you are looking out for a price effective Magento solution for your eCommerce shop, then look nowhere other than Magesolution- Adobe Solution Partner . We not simply offer a powerful solution for all size and budget but also ensure that it helps your online business concern grow and sustain.Contact usfor a free consultation!
How Change A Magento Template,
Source: https://www.magesolution.com/blog/email-templates-in-magento-2/
Posted by: hammerstherong1944.blogspot.com
0 Response to "How Change A Magento Template"
Post a Comment