How to switch store in magento automatically basing on the visitors IP address

StackOverflow https://stackoverflow.com/questions/9923634

  •  27-05-2021
  •  | 
  •  

Вопрос

I am using magento 1.5, I already created different stores in my store.

I created stores based on language.

  • English
  • Chinese
  • German
  • French
  • Spanish

i want to trap the the Ip address of the visitor. If the ip is from france, the store will automatically redirect to the french URL that i have created. If other countries it will redirected to the default store view.

thank you in advance.

Это было полезно?

Решение

I show this action Altought I havent tried it by myself. Here is the link: How to switch store views automatically

Basically, what it says is to add this code in the index.php, which is in the root folder of your magento system.

Good Luck!

Другие советы

You can use the method like Alberto have suggested.

But Add code to index.php file is not good because it is not upgrade friendly. It means if you upgrade to the latest version of Magento, you will loose all the edited index.php file because it was overwritten.

There are many Magento Extension can do this, you just have to "Google" it.

Or you can use this Magento extension. I use it and it is upgrade friendly.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top