Reputation: 67918
I'm setting up a system configuration in the admin backend of magento, and it currently stores it the data in a file, and I wanted to have Magento grab the data from a file to show what the current value is. What method should I be overloading to achieve this? I thought it was the load()
function after extending Mage_Core_Model_Config_Data
, but that was wrong.
Upvotes: 1
Views: 378
Reputation: 401
In order to set the System Configuration Data for your admin, you can try writing upgrade-scripts in your local module in the sql folder. Below is one example where I have set up the System Config Value for Avalanche.
<?php
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->startSetup();
$setup->setConfigData('avalanche_config/avalanche_design/avalanche_customcss','1');
$setup->endSetup();
Syntax and Usage of setConfig data
***setConfigData***
access: public
void setConfigData ( $path, $value, [ $scope = 'default'], [ $scopeId = 0], [ $inherit = 0])
$path
$value
$scope
$scopeId
$inherit
You can refer to http://codemagento.com/2011/02/install-scripts-and-upgrade-scripts/ for writing upgrade scripts.
This is one of the solution of setting up the System Config data, I am not sure if this works for you. Anyway, good luck.
Swapna
Upvotes: 1