2

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

Tom Harrington
  • 69,312
  • 10
  • 146
  • 170
Prince Patel
  • 2,990
  • 1
  • 21
  • 28

1 Answers1

4

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

Clonkex
  • 3,373
  • 7
  • 38
  • 55
Prince Patel
  • 2,990
  • 1
  • 21
  • 28