Hire a web Developer and Designer to upgrade and boost your online presence with cutting edge Technologies

Saturday, June 22, 2013

Magento: how to get custom variables

To get custom variable of Magento you have defined at System > Custom Variables, use the following code to get the values


$plainValue = Mage::getModel('core/variable')->loadByCode('custom_variable_code')->getValue('plain');
$htmlValue = Mage::getModel('core/variable')->loadByCode('custom_variable_code')->getValue('html');

No comments:

Post a Comment