Sunday, 9 October 2011

Magento Code to get General Store Information


Most of the time we want to access Store Contact info at different places of our magento site to do this we have a very simple and useful code i.e
echo Mage::getStoreConfig('general/store_information');
This code will fetch you an array containing complete store which is provided at backend From System->Configuration->General->Store Information. use address
echo Mage::getStoreConfig('general/store_information/address'); 
use phone no
echo Mage::getStoreConfig('general/store_information/phone'); 
or you can get using
$info = Mage::getStoreConfig('general/store_information');
store name : $info['name']
store address : $info['address']
store Phone : $info['phone']

2 comments:

  1. where should i add those codes?

    ReplyDelete
  2. Very Halpfull

    Thanks

    ReplyDelete