The problem appear when I search a product from his SKU, I found it but when I tried to click on it I am redirecting to the main page with a different language code store (default is German, but after clicking I am on http://THESHOP.de/en).

This problem appear only with some specials products. So I tried to compare the product with others but I don't find any differences (in rewrite rules also).

I also noticed that if I search the product in the English store I will find it and if I switch after to German, I've got the product in German and if I make the research again, I will find my product without any problem; but if I am clearing my cookie ... I've got the same problem again.

I tried to re-index data, clearing the cache, made the comparison between different products, look into my cookie configuration but nothing looks to work.

The shop is running under Magento CE

  • I check the cookie, looks like when you arrive on the store for the first time (without any cookie) there is no "store" cookie created. For some product, you can still search them and they are still reachable. But for certain product, they appear in the quick search but still not reachable. – Fernand Ramat Mar 15 '16 at 9:25

Ok, finally it was nothing about the cookies, just a custom redirection in index.php which was not set correctly :

$uri = substr($_SERVER['REQUEST_URI'], 0, 3);
if ($uri == '/en') {
        $mageRunCode = 'en';

After correction :

$uri = substr($_SERVER['REQUEST_URI'], 0, 4);
if ($uri == '/en/') {
        $mageRunCode = 'en';

Because the url of the product start with "en", it was redirecting to the english store ... Now, everything looks to work fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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