Get Free Audit

How to Add a Custom Variable in Magento 2

Jan 25, 2016

1846 Andrey Dubina

How to Add a Custom Variable in Magento 2

In one of my previous articles I explained how to add variables in M2. But the list of default variables is limited. In this article you will find how to create custom variables.

First of all, navigate to System -> Custom Variables

How to Add a Custom Variable in Magento 2

In Variable Code enter the code of the variable without spaces and in lowercase letters. Somehting like working_hours.

Then enter the proper name of the Variable (it’s for internal use only, don’t worry).

Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Variable HTML Value: enter custom HTML code for your variable. (can skip it if don’t want any particular formatting for your plain text).
Variable Plain Value: Here you can enter the text for the variable. Here you can write, for example, that your working hours are from 12 am to 12 pm. Then, you can use this value on multiple pages of your store. And in variables you can change the value and won’t have to make changes on all pages of your store.

How to Add a Custom Variable in Magento 2


Magento Extensions

Take your online store to the next level with BelVG Magento Extensions

Visit the page
Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *