Use of Custom Variables in Magento

System->Custom variables->Add New Variable

custom_variable

To use this in CMS pages just put like below: {{customVar code=your_variable}}

To use this in phtml pages:

  1. $variableHtml = Mage::getModel(’core/variable’)->loadByCode(’your_variable’)->getValue(’html’);
  2. $variableHtml = Mage::getModel(’core/variable’)->loadByCode(’your_variable’)->getValue(’plain’);
Advertisements