betagento/magento2-geoip-detection

Magento2 Extension - GEO Detection from Visitor IP

dev-main 2021-12-13 23:40 UTC

This package is auto-updated.

Last update: 2025-03-14 06:37:19 UTC


README

Overview

Magento2 Online Store can use this extension to detect a country, postcode from a visitor IP via other online services like MindMax, Íptack and be extendable for other GeoIp services.

Installation:

composer require betagento/magento2-geoip-detection:dev-main

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

To use MaxMind GeoIp

composer require require geoip2/geoip2:~2.0
composer require tronovav/geoip2-update

How to use it:

Go to Store >> Configuration >> Betagento >> GEOIP Detection:

GEO Detection Section

image

  • Enabled : Enable this extension
  • Api Service : Maxmind or IP Stack
  • Debug Enabled: Enable debug

Maxmind Configuration

image

Automatically Store Switch

image

  • Enabled : Enable this feature
  • Default Country (Please use website scope) : We will switch to this current website (of Magento) if a such selected country is detected
  • Default store : It will redirect to a default store if a country defined above it is not matched.

Command Line

Download Maxmind Database

bin/magento betagento:geoip_detection:maxmind_download

Testing

bin/magento betagento:geoip_detection:test --ip 12.13.14.15

Code Standard

PHPSTAN - Level 6

image