How i can get the scope_id value from core_config_data table of the current store-view?. I've tried using:
Mage::app()->getStore()->getStoreId();
But this doesn't return the scope_id value.
Thanks!
core-config-datamagento-1magento-1.9store-view
How i can get the scope_id value from core_config_data table of the current store-view?. I've tried using:
Mage::app()->getStore()->getStoreId();
But this doesn't return the scope_id value.
Thanks!
Best Answer
core_config_data
table contain two important fieldsscope
andscope_id
.There are three scope types
If scope is set to
default
thenscope_id
is always 0.If scope is set to
websites
thenscope_id
iswebsite_id
.If scope is set to
stores
thenscope_id
isstore_id
(store view).Imagine that we need to get some config value. How Magento will get the it for current store view?
Search value by priority:
scope ==
stores
andscope_id
== store_id(store view)scope ==
websites
andscope_id
== website_id (to which belongs current store view)scope ==
default
default section of
config.xml