In the previous article, we described what are Magento variables, two main types of Magento variable and how to add variables to email templates.
As we said before, variables contain information that can be created and used in multiple places, and store administrators can create their own variables.
The variables created by store owners are called Magento custom variables, and store owners use custom variables by attaching them to pages, blocks, banners, and email templates.
This article will provide a tutorial on creating and adding Magento custom variables control panel.
To create Magento custom variables and attach them to pages, blocks, banners, and email templates, you have to know a little HTML code and how to use a markup tag.
{{CustomVar code= “my_custom_variable”}}
To create Magento custom variables control panel, you have to follow these steps:
- On the admin sidebar, click System. Then under Other Settings, click Custom Variables. Click Add variables
- Input an identifier in the Variable Code field using lowercase and no spaces
- In the Variable HTML Value text field, use HTML tags to input any content you want to include. This option helps you format the value.
- In the Variable Plain Value text field, you can add variable value as plain text.
Tips: To enlarge the boxes, drag the right corner.
- Click Save after completed
Above is a complete tutorial on how to add Magento custom variables control panel.
We hope that store owners can handle the progress of using variables, and use all variables effectively in their online store.
Leave a comment or contact email directly if you have any other ways to add custom variables.
In the next article, we will describe markup tags and how to use markup tags in links. Don’t forget to track Mageguides to read more useful Magento 2 articles.