In magento 1.9 What is diffrence between getstoreconfig() and getstoreconfigflag() methods?
The methods look like this:
public static function getStoreConfig($path, $store = null)
{
return self::app()->getStore($store)->getConfig($path);
}
public static function getStoreConfigFlag($path, $store = null)
{
$flag = strtolower(self::getStoreConfig($path, $store));
if (!empty($flag) && 'false' !== $flag) {
return true;
} else {
return false;
}
}
The only difference is that getStoreConfig()
will return the exact value while getStoreConfigFlag()
returns boolean true or false.
Both methods send us to Mage_Core_Model_Store::getConfig()
.