I have the following lines to get a core_config_data value in a mysql upgrade script

$installer = $this;
$adapter = $installer->getConnection();

$my_store = Mage::getModel("core/store")->load("my_store", "code");
$templatePath = 'foo/bar';
$config_value = Mage::getStoreConfig($templatePath, $my_store);  

if I debug $config_value I get null. However if I add this to a controller action I get the expected value. So it seems that I can't retrieve a config value from within a mysql upgrade script?

  • Is the output of $my_store correct? – Black Apr 12 at 17:49
  • @Black yes it is as expected showing the correct store – Alan A Apr 12 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.