1

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

$installer = $this;
$installer->startSetup();
$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?

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.