2

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?

1
  • 1
    Easy described: The langauge switch expects the url key to be global, which you changed. No time to describe solution in detail, but there are two ways: either you add a redirect (if and only if) EVERY URL KEY is unique or you have to implement the mapping by yourself I think. Load the url_rewrite from the old store where you came from, get the product, get the correct url and redirect Commented Apr 9, 2014 at 11:39

1 Answer 1

3

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.