Programmatically change Magento core config data

0 votes
475 views
asked Jun 22, 2016 in Magento by Blake Thompson
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
answered Jun 29, 2016 by Jordan Meya
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 236 views
asked Jun 22, 2016 in Magento by Callum Seth
+2 votes
0 answers 107 views
+1 vote
1 answer 135 views
0 votes
1 answer 132 views
asked Dec 16, 2016 in Magento by anonymous
+1 vote
1 answer 15 views
0 votes
1 answer 38 views
...