0

This question already has an answer here:

I am starting a Magento project for 7 countries, I want to add for each country two languages English and Arabic.

All stores have the same products. As first thought I think the best approach to have a store for each country, and each store has two store views.

The problem that each country should have different url.

For example

www.mystore.com/country1
www.mystore.com/country2
www.mystore.com/country3

And the user should be able to change the language without changing showing the language code in the url.

I found a website that is using that approach http://markavip.com/

So could you please suggest a way to do it ??

Edit one: What I did step by step

First Step : I created a new website with code 'qatar', then I created a new store with Default Category as Root Category ( because I want the same products for all stores ). Then I created a view for the store.

Second Step : After that I created a new sub folder called qatar and I copied the .htaccess file and add this code.

SetEnvIf Host / MAGE_RUN_CODE=qatar;
SetEnvIf Host / MAGE_RUN_TYPE=website;  

No reason for it because I couldn't find the explanation with sub folder.

Third step: I changed Auto-redirect to Base URL in default config to No, and then I changed the Base Link URL in qatar website to {{secure_base_url}}qatar/

I tested it using this url magento:8888/qatar/ in my machine and it shows this :

Forbidden
You don't have permission to access /qatar/ on this server.

To solve the problem I copied the index.php and add this code

$mageRunCode='qatar';
$mageRunType='website';

Then I test it again it work but when I go this category page it shows

There are no products matching the selection.

So when I access the main website

magento:8888/men/shirts.html

I can see all products. but at this url I can't see any product

magento:8888/qatar/men/shirts.html

Edit Two: I update the product to be in the second website also. And it work perfectly, but could you please see my steps because I am afraid that I may did a hidden mistake.

marked as duplicate by Amit Bera, Keyul Shah, Mufaddal, MTM, mbalparda Sep 7 '14 at 22:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @Marius Could you please see the update post. I don't thinks it is a duplicate because I want to create different stores for the same domain but different url. – Mohd Alomar Sep 2 '14 at 0:31
  • You did right. Please add a answer and mark it as solution. – Fabian Blechschmidt Sep 7 '14 at 6:14
0

What you want is:

  • Different websites for each country
  • different store views for each language
  • don't show store view code in url
  • I did it and search a lot but now I have a problem with products in the second website could you see the updated post. – Mohd Alomar Sep 2 '14 at 0:32

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