In Magento, the function getStoreConfig($path) will get the value of $path in table core_config_data. I’ve checked there is a value for the $path I use which is carriers/flatrate/infotext , but I still got nothing returned from the call Mage::getStoreConfig('carriers/flatrate2/infotext') .
I’ve tried to disable the cache as well as flushing all caches but it still doesn’t work.
This happened when I try to install GLS extension for Magento, is there any case that somehow it interferes with this function ? Thanks
Update:
I’ve just found out something : this function actually returns the text, I find nothing wrong with it but it doesn’t work, when I try to use Magento::getStoreConfig directly, it works.
protected function getInfoText($carrierCode)
{
if ($text = Mage::getStoreConfig('carriers/'.$carrierCode.'/infotext')) {
return $text;
}
return '';
}
Magento version: 1.7 CE
Magento caches the StoreConfig in memory, so make sure you flush all the cache after making change in config_store_data in Magento. This happens when you try to upgrade or install new extension – which is my case.