betagento/magento2-geoip-detection

Magento2 扩展 - 来自访客 IP 的 GEO 识别

安装: 1

依赖项: 0

建议者: 0

安全: 0

星级: 0

关注者: 2

分支: 0

开放问题: 0

类型:magento2-module

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

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 识别部分

image

  • 启用:启用此扩展
  • API 服务:Maxmind 或 IP Stack
  • 调试启用:启用调试

Maxmind 配置

image

自动商店切换

image

  • 启用:启用此功能
  • 默认国家(请使用网站范围):如果检测到所选国家,我们将切换到当前网站(Magento)
  • 默认商店:如果上述国家未匹配,它将重定向到默认商店。

命令行

下载 Maxmind 数据库

bin/magento betagento:geoip_detection:maxmind_download

测试

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

代码标准

PHPSTAN - 级别 6

image