I have added a custom field- Fax number on System > Configuration > General > Store information. I need to use this variable value in my cms page.
There are system variables which we can use in our cms blocks like {{store_name}}, {{store_email}}
.
I want to use my fax number as a variable. Something like {{store_fax_number}}
I have tried creating custom variable but don't know how to add a configuration field value to that variable.
I know I can add directly my fax number to a custom variable. But I don't want to do that. I want to add a field in store information and then use that value in custom variable.
If anyone have any idea please help.
Magento 1.7 – How to Add System Configuration Variable Value in Custom Variable
configurationmagento-1.7
Best Answer
I found the solution.
To use a custom field value in cms block, you can use the below code.
I added a new field named fax in system.xml file located at
local/Mage/Core/etc/
the code for adding the field is,Now to use this variable value in your cms block you just need to add below code
here
fax
is the name of your field.