Magento get base url

Posted by Damodar Bashyal on April 29, 2013

 

It's easy to get Magento get base url. Just use below code to retrieve base url.

Mage::getBaseUrl('type_of_link', 'secure_or_unsecure');

For example:

More»

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»