I am currently working on a shop that serves two countries: UK and Germany. The shop has the same inventory and content for both countries, only the proudct prices are different.
I have learned that I have to create two different Websites in Magento in order to be able to show different prices for the same product. I have done that and now I have a different URL for each country: example.com/uk and example.com/de.
Now when a customer goes to example.com, they should be presented with a country selection, e.g. "Please select your country: UK or Germany".
What is the suggested solution here? I have tried creating a third "Country Selection" website that is the default website and that has this "Country Selection" CMS page as its CMS Home Page, but that feels really hacky and also the content is then also available at example.com/some-product…
Best Answer
Assuming you have 1 domain: domain.com with a running Magento installation with 2 websites (with each 1 store) I would suggest the solution below.
Create 2 sub-directories in your Magento root folder like this:
After that I would adjust the base urls of both websites to be:
Make the requirement modifications of index.php in each sub-directory:
Replace
with (*don't forget to modify 'THE_CORRECT_STORE_CODE' in the below code snippet*)
Inside your Magento-root folder I would create a index.html file that will server as the language selection page. (When doing this don't forget to change the
DirectoryIndex index.php
inside the .htaccess file)Also in this .htaccess file you should redirect all traffic that wants to visit non language/country specific urls to the language selection page...
I hope this helps you out ;)