betagento / magento2-geoip-detection
Magento2 扩展 - 来自访客 IP 的 GEO 识别
dev-main
2021-12-13 23:40 UTC
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-09-14 05:44:38 UTC
README
概述
Magento2 在线商店可以使用此扩展通过其他在线服务(如 MindMax、Íptack)检测访客 IP 的国家/地区和邮政编码,并可以扩展到其他 GeoIp 服务。
安装
composer require betagento/magento2-geoip-detection:dev-main
此软件包无法通过 Composer 1.x 安装,请确保您已升级到 Composer 2+。有关我们关于 Composer 1.x 弃用的更多信息。
使用 MaxMind GeoIp
composer require require geoip2/geoip2:~2.0
composer require tronovav/geoip2-update
如何使用它
转到商店 >> 配置 >> Betagento >> GEOIP 识别
GEO 识别部分
- 启用:启用此扩展
- API 服务:Maxmind 或 IP Stack
- 调试启用:启用调试
Maxmind 配置
- 许可证密钥:从 https://www.maxmind.com/en/home 获取的许可证密钥
- 技术解决方案
自动商店切换
- 启用:启用此功能
- 默认国家(请使用网站范围):如果检测到所选国家,我们将切换到当前网站(Magento)
- 默认商店:如果上述国家未匹配,它将重定向到默认商店。
命令行
下载 Maxmind 数据库
bin/magento betagento:geoip_detection:maxmind_download
测试
bin/magento betagento:geoip_detection:test --ip 12.13.14.15
代码标准
PHPSTAN - 级别 6