What is diffrence between getstoreconfig and getstoreconfigflag?

1.4k Views Asked by At

In magento 1.9 What is diffrence between getstoreconfig() and getstoreconfigflag() methods?

1

There are 1 best solutions below

0
On BEST ANSWER

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().