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:
Hello, I'm adding the following as env variables.
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.