i have console command that is creating store views and setting different languages for them. I want to have second console command that can change the default store view of the store. How can i do this ?
Solved! Go to Solution.
Magento uses the `MAGE_RUN_CODE` environment variable to determine which store to load. You could write a script which updates this environment variable automatically:
http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_over.html
Magento uses the `MAGE_RUN_CODE` environment variable to determine which store to load. You could write a script which updates this environment variable automatically:
http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_over.html
Hello, I'm adding the following as env variables.
MAGE_RUN_TYPE=store
MAGE_RUN_CODE=de
I do log on the PHP $_ENV variable and the variables are there so Magento knows about them.
I have Store View with Code: de
When i open the store home page i still go to "Default Store View" instead of the Germany store view.
Hard for me to say as that is in general what you need to do. As a developer, the easiest way is to look where those variables are used and see why it's not taking effect.