Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/EaDesgin/magento2-mobiledetect
Mobile detect change theme and redirect based on device type. Magento 2 module.
https://github.com/EaDesgin/magento2-mobiledetect
magento magento-2-mobile magento-mobile magento2-extension magento2-mobile magento2-mobiledetect magento2-module
Last synced: 3 months ago
JSON representation
Mobile detect change theme and redirect based on device type. Magento 2 module.
- Host: GitHub
- URL: https://github.com/EaDesgin/magento2-mobiledetect
- Owner: EaDesgin
- Created: 2016-12-14T16:50:27.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-23T13:18:55.000Z (about 5 years ago)
- Last Synced: 2024-07-16T09:53:31.305Z (4 months ago)
- Topics: magento, magento-2-mobile, magento-mobile, magento2-extension, magento2-mobile, magento2-mobiledetect, magento2-module
- Language: PHP
- Homepage: https://www.eadesign.ro
- Size: 38.1 KB
- Stars: 28
- Watchers: 11
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Magento 2 Mobile Detect Theme Change
[![Build Status](https://travis-ci.org/EaDesgin/magento2-mobiledetect.svg?branch=master)](https://travis-ci.org/EaDesgin/magento2-mobiledetect)
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 desktopUnder 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](https://packagist.org/packages/eadesignro/module-mobiledetect).
Via composer
``` bash
composer config repositories.magento2-mobiledetect git [email protected]:EaDesgin/magento2-mobiledetect;
`````` bash
composer require eadesignro/module-mobiledetect;
`````` bash
php bin/magento setup:upgrade;
```# Uninstall
You need to remove the module.
``` bash
composer remove eadesignro/module-mobiledetect;
```