How To Use Magento GeoIP Store Switcher Based on Customer Location
Determining Customers Location can be Quite Useful.
Magento doesn’t have such functionality so far by Default
Don’t Worry We are here to Show how you can do This
How You can Do this • In this Presentation we decided to help you in understanding of GeoIP integration into Magento. Moreover, we will show you how to find customer location for redirection to a proper store.
How to Start •
As I told earlier that This Function is not available in Magento by Default. You have to need third part Extension for it. I have found one of that extension which works fine. They have already integrated GEOIP. Install Magento default store Module it and then do following steps
IP database under System Configuration->General->Countries Options:
Let’s imagine that we have three different stores: English, French, German
Our Goal is to redirect a customer automatically to a specific store, basing on his location.
we will redirect a customer only on the first visit
Set cookie to Prevent further checks • in controllerActionPostdispatch method first of all we check if a customer hasn’t been already redirected, then determine country by IP, check country to store relation and redirect to a store if it is not the current store. Finally, we set cookie to prevent further checks
Set cookie to Prevent further checks