如何以编程方式设置Magento存储配置数据?

如何以编程方式设置Magento存储配置数据?,magento,configuration,Magento,Configuration,要获取存储配置数据,我将使用以下代码: $data = Mage::getStoreConfig('my/path/whatever'); 现在,如何保存到该节点?我尝试了阿兰的建议,但对我无效 谢谢 尝试以下操作: $value = "100"; Mage::getModel('core/config')->saveConfig('my/path/whatever', $value); 或 帝国解决方案是正确的,但请记住在它之后清理缓存。所以使用类似 $value = "100";

要获取存储配置数据,我将使用以下代码:

$data = Mage::getStoreConfig('my/path/whatever'); 
现在,如何保存到该节点?我尝试了阿兰的建议,但对我无效

谢谢

尝试以下操作:

$value = "100";
Mage::getModel('core/config')->saveConfig('my/path/whatever', $value);


帝国解决方案是正确的,但请记住在它之后清理缓存。所以使用类似

$value = "100";
Mage::getModel('core/config')->saveConfig('my/path/whatever', $value);
Mage::getModel('core/config')->cleanCache();

这适用于任何配置设置吗?我在magento遇到了一个类似的问题。交换:第一个问题对我不起作用。第二个示例中的哪个参数是要保存的值?
$value = "100";
Mage::getModel('core/config')->saveConfig('my/path/whatever', $value);
Mage::getModel('core/config')->cleanCache();