Override Magento Config

前端 未结 3 1550
耶瑟儿~
耶瑟儿~ 2020-12-16 05:40

I am looking for a good solution to override the Magento config without changing the default values.

For example, I want to override the \"web/unsecure/base_skin_url

3条回答
  •  渐次进展
    2020-12-16 06:43

    Alan's answer is correct, but it doesn't care about the config cache. For example, if you call Mage::getStoreConfig('web/unsecure/base_skin_url') twice and change the value in between, the change has no effect. To get around this issue, you should use $store->setConfig('web/unsecure/base_skin_url', 'value_to_set'). It does both: update the config cache and set the config node with Alan's method.

提交回复
热议问题