Home

Awesome

<a href="http://www.magepal.com" title="Top Magento 2 Extension Provider" ><img src="https://image.ibb.co/dHBkYH/Magepal_logo.png" width="100" align="right" alt="Magento Extension Provider" /></a>

Magento2 GeoIp Extension by MagePal

Automatically detect your visitor country code base on their Ip Address in Magento2.

Base Module for

Usage

    public function __construct(
        ...
        \MagePal\GeoIp\Service\GeoIpService $geoIpService,
        ....
    ) {
        ...
        $this->geoIpService = $geoIpService;
    }
    
    
    $countryCode = $this->geoIpService->getCountryByIpAddress('128.0.0.101');
    //or
    $countryCode = $this->geoIpService->getCountry();
    

Step 1

Using Composer (recommended)
composer require magepal/magento2-geoip
Manually (not recommended)

Step 2 - Enable extension ("cd" to {Magento root} folder)

  php -f bin/magento module:enable --clear-static-content MagePal_GeoIp
  php -f bin/magento setup:upgrade

Contribution

Want to contribute to this extension? The quickest way is to open a pull request on GitHub.

Support

If you encounter any problems or bugs, please open an issue on GitHub.

Need help setting up or want to customize this extension to meet your business needs? Please email support@magepal.com and if we like your idea we will add this feature for free or at a discounted rate.

Magento 2 Extensions

© MagePal LLC. | www.magepal.com