Store View – Language Switch on Product Page Returns 404

languagestore-view

Having trouble switching between languages on product view of Magento 1.8.1.0. Already tried extensions/solutions from Vinai and DGagliardi resulting in same one-way redirection behaviour.

Our case:

VIEWS:

  • Lithuanian (default)
  • English

Product info:

  • URL default: product-title-in-lithuanian
  • URL lithuanian: "Use Default Value"
  • URL english: product-title-in-english

Behaviour

  • from Lithuanian view:
    • being on /lt/product-title-in-lithuanian
    • switching to english sends to /en/product-title-in-lithuanian
    • which itself redirects properly with 301 to /en/product-title-in-english
  • from English view:
    • being on /en/product-title-in-english
    • switching to lithuanian sends to /lt/product-title-in-english
    • which DOES NOT redirect to /lt/product-title-in-lithuanian and ends with 404 error

Any tip what could be the problem here?

Best Answer

Found my problem - I was not using the ___from_store variable when switching store views. It is needed for the cross-view rewrite to happen properly. Restored the ___from_store in the language switch template with $_lang->getCurrentUrl() and it's working fine now with Vinai solution. No 404s... phew... finally...

Related Topic