How To Add A Magento Store Config Value Programmatically

How can I add a new Magento store config data via template or block programmatically

You can use Magento core/config model to add new Magento store config.

$coreConfig = Mage::getModel('core/config');
$scope = "default";
$scopeId = 0;
$coreConfig->saveConfig('sectionName/groupName/fieldName', 'your value', $scope, $scopeId);

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments