I'm facing an issue with the language switcher (store view) just on product pages as the categories, pages, check out, brands and site menu are working OK (showing the content translated) when using the language switcher. On the contrary, when I'm on a product page and switch the language I face ""too many redirect error" and the product page is not loaded.
My "url_key" attribute is set to Global and Magento is just adding the suffix "?___store=default&___from_store=english" to the product URL, but somehow it gets "too many redirects errors". The "Add Store Code to Urls" option is disabled and the .htaccess file looks allright and the "rewrite conditions" seem to be fine....
I am confused because the switcher is working fine except on the product pages that keep getting "too many redirects error". The site recently added an SSL certificate but the site was tested and running OK. The .htaccess is forcing http to https redirections but, as previously said, apart from that, everything looks fine to me. All the security patches have been installed and can't get any relevant information on my system.log file neither.....
Has anyone faced the same issues with the language switcher on product pages only? Any idea would be more than welcome...
Solved! Go to Solution.
UPDATE: I've replaced my .htaccess with a fresh one and the problem is still there
--- Strangely, the store view switcher is working as it should with all the other pages adding the suffix (?___store=english&___from_store=default) but falls into an infinite loop with the product pages... The URL_KEY is set to Global and all store views share the same URL.
Any idea would be more than welcome?
Fixed! The problem with the storeview switcher just on product pages (infinite loop) was caused by the file languages.phtml located here: /app/design/frontend/default/<your_theme>/template/page/switch/languages.phtml;
specifically with this line that was missing the "(false)" part:
<option value="<?php echo $_lang->getCurrentUrl(false) ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>