I have a module: app/code/local/Namespace/Resize/
so I turned on the option to disable / enable the option using Magento admin.
System > Configuration > Namespace > Resize
but when I try to access this option, I always get NULL with Mage::getStoreConfig , although the parameter is set to Yes.
Mage::getStoreConfig('resize/settings/enabled', Mage::app()->getStore()->getId());
or
Mage::getStoreConfig('resize/settings/enabled');
returns null
config.xml
<?xml version="1.0"?> <config> <modules> <Namespace_Resize> <version>0.0.1</version> </Namespace_Resize> </modules> <global> <helpers> <resize> <class>Namespace_Resize_Helper</class> </resize> </helpers> <events> <catalog_product_save_after> <observers> <resize> <type>singleton</type> <class>namespace_resize_model_observer</class> <method>catalog_product_save_after</method> </resize> </observers> </catalog_product_save_after> </events> </global> </config>
system.xml
<?xml version="1.0" ?> <config> <tabs> <resizing module="resize" translate="label"> <label>Resize</label> <sort_order>100</sort_order> </resizing> </tabs> <sections> <resize module="resize" translate="label"> <label>Resize</label> <sort_order>200</sort_order> <show_in_default>0</show_in_default> <show_in_website>0</show_in_website> <show_in_store>1</show_in_store> <tab>resizing</tab> <groups> <settings module="resize" translate="label"> <label>Settings</label> <sort_order>10</sort_order> <show_in_default>0</show_in_default> <show_in_website>0</show_in_website> <show_in_store>1</show_in_store> <fields> <enabled translate="Enable resize"> <label>Enabled</label> <comment>Backend Resizing</comment> <frontend_type>select</frontend_type> <source_model>adminhtml/system_config_source_yesno</source_model> <show_in_default>0</show_in_default> <show_in_website>0</show_in_website> <show_in_store>1</show_in_store> </enabled> </fields> </settings> </groups> </resize> </sections> </config>
adminhtml.xml
<?xml version="1.0" ?> <config> <acl> <resources> <admin> <children> <system> <children> <config> <children> <resize> <title>Resize Settings</title> </resize> </children> </config> </children> </system> </children> </admin> </resources> </acl> </config>
helper app/code/local/Namespace/Resize/Helper/Data
<?php class Namespace_Resize_Helper_Data extends Mage_Core_Helper_Abstract { }
config id | scope | scope id | path | value
785 | stores | 1 | resize / settings / enabled | 1
Can anyone help me what is wrong?
thanks
source share