Hello!
I have a Magento 2.3 store with several store views for different languages, accessed via domain.com/it, domain.com/fr, domain.com/be etc etc.
Have a look below:
The majority of products are accessible on all views but some are restricted to base (en) only.
I'm having an issue where if a product is only assigned to the base store, the site will load it in an incorrect store view.
So, for example, I have a product assigned to the English store (which is just accessed from the domain, without a subdirectory). When I open this product on the front end, it will load it in the Italian store view.
Interestingly, if I go to the same url with the IT store code (e.g. if the problem url is domain.com/product, I go to domain.com/it/product) it 404's!
The funny thing is, I don't know why it's choosing a particular store view to load as default. There's no reason why Italian is treated as the store to display (as it alongside French and Netherlands has a sort order of 0).
Other things I have noticed:
If anyone can shed some light on this, I would be most grateful. I have a feeling it could be how the stores are set up, but I'm fairly certain I've done it correctly.
I've also posted this on stackexchange, but I've had no replies. I'm absolutely stuck - I have no idea why this is happening :-(
Solved! Go to Solution.
Ok, I have solved it.
I'm using this extension - https://www.magmodules.eu/magento2-alternate-hreflang.html. I disabled it and lo and behold the correct languages load!
Looking at the vendor website, it appears I'm 2 versions out of date, so I will upgrade and see if that fixes it!
Hello @tmaharding
If you are using a custom theme like Theme monster, then please disable layout switcher from admin panel.
It will solve your issue.
Hope it helps.
Hey @Meetanshi. Thank you for the reply.
Unfortunately, I don't have that section in my CMS - I use Infortis Ultimo theme.
What would the layout switcher do from a technical point of view (so maybe I can see if Infortis has a similar feature)?
Thanks :-)
Tom
Ok, I have solved it.
I'm using this extension - https://www.magmodules.eu/magento2-alternate-hreflang.html. I disabled it and lo and behold the correct languages load!
Looking at the vendor website, it appears I'm 2 versions out of date, so I will upgrade and see if that fixes it!