I've created a Magento extension which uses the system.xml file in my /etc/ dir (for my module) to add fields to my configuration. Magento 1.5 is my target system at the moment, but I also intend to extend compatibility to 1.4 and .16
<merchantid translate="label">
<label>Merchant ID</label>
<frontend_type>text</frontend_type>
<sort_order>20</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</merchantid>
I'm trying to populate the value of this field during runtime. Currently, I am running this inside my plugin: Mage::getStoreConfig('payment/mymerchant/merchantid'); which returns the value populated in the field.
I need to be able to update this field programatically, I tried this:
$installer = new Mage_Core_Model_Resource_Setup();
$installer->startSetup();
$installer->setConfigData("payment/mymerchant/merchantid", "TEST");
$installer->endSetup();
But had no success. I am having trouble googling the problem too because most results don't appear relevant.
Does anyone have anyidea how I can set these values?