Can someone tell me what core function do Magento call for default store view to be set on the frontend?
I searched it for hours in Mage/Core/Model and didn’t found it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Method links provided for convenience.
Mage::run('','store')Mage_Core_Model_App::run(array(array('scope_code'=>'','scope_type'=>'store')))Mage_Core_Model_App::_initCurrentStore('','store')Mage_Core_Model_App::_initStores('','store')Within
_initStores()is a loop which iterates over thecore_storecollection. The loop contains a test to see if the App instance’s_storeproperty is set, and if not, sets it to the current collection member if that member has a primary key which evaluates to true. In other words, despite the fact that the admin store is the first item in the collection, because its ID is 0, it will not be used.