0 votes
2.3k views
in Magento by
How is it possible to programmatically change Magento’s core config data? Not sure if this is even possible in a proper channel?

1 Answer

0 votes
by
Here is how to...
Please use this only at your own risk.

<?php
// find 'path' in table 'core_config_data' e.g. 'design/head/demonotice'
$my_change_config = new Mage_Core_Model_Config();
// turns notice on
$my_change_config->saveConfig('design/head/demonotice', "1", 'default', 0);
// turns notice off
$my_change_config->saveConfig('design/head/demonotice', "0", 'default', 0);
?>

Related questions

0 votes
1 answer 1.6k views
asked Jun 22, 2016 in Magento by Callum Seth
+2 votes
0 answers 1.1k views
+1 vote
1 answer 1.8k views
0 votes
1 answer 2.3k views
asked Dec 16, 2016 in Magento by anonymous
+1 vote
1 answer 7.8k views
asked Jan 31, 2018 in Magento by Edward121 (260 points)
0 votes
1 answer 14.5k views
...