eadesignro/module-mobiledetect

Magento 2 EaDesign 移动设备检测系统

安装: 278

依赖项: 0

建议者: 0

安全: 0

星标: 28

关注者: 11

分支: 22

公开问题: 1

类型:magento2-module

1.1.7 2017-07-17 05:48 UTC

This package is auto-updated.

Last update: 2024-09-10 08:10:36 UTC


README

Build Status

Magento 2 移动设备检测系统可以根据客户端设备(桌面、平板、手机)加载不同的主题。它使用https://github.com/serbanghita/Mobile-Detect 库。

如何使用模块

主要配置可以在内容 > 设计 > 配置下完成。在那里(设计规则 > 用户代理规则),您可以添加用户代理表达式。

  • 添加 eadesign_is_mobile 来加载手机主题
  • 添加 eadesign_is_tablet 来加载平板主题
  • 添加 eadesign_is_desktop 来加载桌面主题

在系统配置中,您需要启用扩展。在那里,您还可以找到3个重定向字段。例如,如果您将URL添加到移动字段,则用户将被重定向到那里的URL。如果您想为移动主题使用不同的网站/商店视图URL,这可能很有用。

安装。

您可以通过composer或手动将其添加到app/code目录中来安装模块。该模块可在packagist.org 上找到。

通过composer

composer config repositories.magento2-mobiledetect git git@github.com:EaDesgin/magento2-mobiledetect;
composer require eadesignro/module-mobiledetect;
php bin/magento setup:upgrade;

卸载

您需要删除模块。

composer remove eadesignro/module-mobiledetect;