1

I have set up several store views(for different languages), all under the same website and store.

The languages appear nicely, and I can switch between them. I have created several categories and started to localize them. All was going nicely.

The way I have set up the categories was like this(example): /women (name:"Women", slug:"women") -->shoes (name "Shoes", slug: "shoes")

And one of it's translations:

/zhen (name:"Zhen", slug:"zhen") -->obuv (name:"Obuv", slug:"obuv")

I could see my products, categories appear on the website and I could switch between languages using the language switcher.

Now, the problems arose when I noticed that I could only get to see the pages in other languages if I used the language switcher. If I copy pasted a mysite.com/zhen/obuv into an incognito window, it would show me a 404. So in other words, If I sent the link to a person, he would also get the 404. So the only way to see the page in other languages was to use the language switcher(which presumably wrote a cookie to the browser), which would allow to see the localized category/page of the website.

I have checked URL rewrites in the Magento settings, they do look correct, i.e. both of those slugs/url are pointing to the same category(target path).

I have tried everything, emptying the URL rewrite table. Re-indexing, clearing cache, checking and re-checking all setting for store views/categories etc.

Then I've tried to set the "Add Store Code to Urls" to Yes. Which resolved all the problems, but also added a mysite.com**/en/** store codes to every page/store. Now it works more or less ok.

My questions are: 1. Where the URLs not resolving because it is not intended to be used that way(in the case of multi store)? (All things should have the same slug in case that I'm not suing store codes?) 2. Is it imperative to use store codes (like /en/) when trying to run a multi store view website?

Am I missing something here?

1

To get around this problem, you could consider using another URL for the second store view and then explicitly set that store ID -> then it would work.

Let's assume you have www.store.com

Then use for example www.store.com/de/ for the German store view (i.e. set this as the base URL for that store view in your backend).

In the index.php (or better using .htaccess logic) you should then detect that whenever there is /de/ in your URL, you set the store ID to your second store view.

That way, the URL of the translated store is uniquely detectable and everything will work out while you still keep the original URL for your main store.

  • Thanks for your advice, I have already considered this option(through an extension). But unfortunately it does not answer my questions. What is usually the best/goto practice with multi store views for Magento? – Gene K Dec 9 '14 at 19:03
0

There is no best practice it's more of an SEO question quoted from seomoz:

"If you're targeting a specific country, think about using a ccTLD. But, if you are focusing on language targeting only, a ccTLD probably isn't your best choice as they're meant for targeting a specific geographic area and not specifically the language spoken there. In these cases, you'll likely want to use a different internationalization technique such as using hreflang, subfolders, or subdomains in combination with or instead of using a ccTLD." source: https://moz.com/learn/seo/international-seo

The key point there is are you just providing a translation for users of your base country? Or are you actually selling to different parts of the world and have translated marketing to match.

The second aspect is maintainability I would argue there's not a huge overhead in Magento using TLD vs subfolders but it does make the setup that bit more complex.

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.