eadesignro / module-mobiledetect
Magento 2 EaDesign Mobile Detect System
Installs: 278
Dependents: 0
Suggesters: 0
Security: 0
Stars: 28
Watchers: 10
Forks: 22
Open Issues: 1
Type:magento2-module
Requires
- php: ~5.6.5|7.0.2|7.0.4|~7.0.6
- eadesignro/module-eacore: ^0.0.4
- magento/framework: 100.1.*
- magento/module-backend: 100.1.*
- magento/module-theme: 100.1.*
- mobiledetect/mobiledetectlib: 2.8.*
Requires (Dev)
- phpmd/phpmd: ^2.3
- phpunit/phpunit: ^4.8
- satooshi/php-coveralls: ^1.0
- sebastian/phpcpd: ^2.0
- squizlabs/php_codesniffer: ^2.5
This package is auto-updated.
Last update: 2024-12-10 08:38:43 UTC
README
Magento 2 Mobile detect system can be used to load different themes base on the client device (desktop, tablet, mobile). It uses the library https://github.com/serbanghita/Mobile-Detect.
How to use the module
The main configuration can be done under the Content > Design > Configuration. There (Design Rule > User Agent Rules) you can add user agent expressions.
- add
eadesign_is_mobile
to load a theme for mobile - add
eadesign_is_tablet
to load a theme for tablet - add
eadesign_is_desktop
to load a theme for desktop
Under system configurations you need to enable the extension. Also there you will find 3 fields for redirects. If you add a url to the mobile field for example the user will be redirected to the url in there. This can be useful if you want to use a different website/store view url for the mobile theme.
Installation.
You can install the module via composer or manually by adding it to the app/code directory. The module is available on packagist.org.
Via composer
composer config repositories.magento2-mobiledetect git git@github.com:EaDesgin/magento2-mobiledetect;
composer require eadesignro/module-mobiledetect;
php bin/magento setup:upgrade;
Uninstall
You need to remove the module.
composer remove eadesignro/module-mobiledetect;