Skip to content

vtransy/magento2-geo-ip-store-currency-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

magento2-geo-ip-store-currency-switcher

Auto switch to correct store & currency base on IP of customer for Magento 2

This solution uses Apache GEO IP module, it get IP from GEOIP_COUNTRY_CODE env variable then set store for Magento. Reference here about Apache GEO IP module: https://kb.layershift.com/enable-apache-mod_geoip

If you use Nginx, you can check geoip for Nginx here: http://nginx.org/en/docs/http/ngx_http_geoip_module.html

Add switch store code in index.php file (view detail in index.php file of repo).

  • If you use index.php in webroot add this code to index in webroot
  • If you use index.php in pub add this code to index in pub

About

auto switch to correct store & currency base on IP of customer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages