Programmatically change Magento core config data

0 votes
806 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 343 views
asked Jun 22, 2016 in Magento by Callum Seth
+2 votes
0 answers 284 views
+1 vote
1 answer 329 views
0 votes
1 answer 542 views
asked Dec 16, 2016 in Magento by anonymous
0 votes
1 answer 689 views
+1 vote
1 answer 573 views
...