![]() ![]() This way, it will not break other setups. The plugin checks to see if MAGE_RUN_TYPE is set to store and MAGE_RUN_CODE contains a string value. This way a cookie can never override the environment variable. If a store code is set by the webserver using an environment variable, the plugin will not read the cookie but return the store code as defined by the webserver instead. StoreResolver::getCurrentStoreId which looks up the store code in the database and returns its ID. This module uses a plugin for Magento's StoreCookieManager::getStoreCodeFromCookie method which is responsible for reading the store code from the locale switcher cookie. Steps 7 and 8 will be repeated until the browser gives up and shows a Too many redirects error message:.It loads the English store view, but because the hostnames do not match it redirects to. Magento finds the cookie (from step 6) set to default and ignores the environment variable. It loads the Dutch store view, but because the hostnames do not match it redirects to. Magento finds the cookie (from step 3) is set to nl and ignores the environment variable. Magento sets the cookie for to default and redirects the visitor to.Now, the visitor tries to switch back to English using the locale switcher.Magento finds no cookie (as it was set for the other domain), but the environment variable is set to nl so the Dutch store view is shown. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |