Programmatically change Magento core config data

0 votes
542 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 270 views
asked Jun 22, 2016 in Magento by Callum Seth
+2 votes
0 answers 168 views
+1 vote
1 answer 201 views
0 votes
1 answer 250 views
asked Dec 16, 2016 in Magento by anonymous
0 votes
1 answer 74 views
+1 vote
1 answer 98 views
...