$isEnabled = Mage::getStoreConfigFlag('my_module/general/enable'); if ($isEnabled) { // do something }
$storeId = Mage::app()->getStore()->getId(); $isTaxEnabled = Mage::getStoreConfigFlag('tax/calculation/enable', $storeId); if ($isTaxEnabled) { // do something }In this example, we are checking whether the `tax/calculation/enable` flag is set to true for a specific store view. We obtain the store view ID and pass it as a second parameter to the `Mage::getStoreConfigFlag()` function. Package library: Mage_Core_Model_Config.