magento get store configuration

Posted by Damodar Bashyal on April 29, 2013

 

How to get Magento system configuration value?

It's easy:

Mage::getStoreConfig($path, $storeCode) // $storeCode is not required

for example you need to get value set for store phone number from system config:

More»

Magento get base directory

Posted by Damodar Bashyal on April 29, 2013

 

You can get different directory paths in magento with one line code.

Mage::getBaseDir('directory_type');

where directory_type can be:

More»

Set application root absolute path in magento

Posted by Damodar Bashyal on April 19, 2013

 

If you want to change the path of magento core application folder, then you can set it as:

Mage::setRoot('/path/to/your/app');

If you look into app/Mage.php you will find that function.

More»