gplcart / device
Allows to detect user's device type (mobile, tablet) and switch to the corresponding theme
Installs: 2
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:gplcart-module
Requires
This package is not auto-updated.
Last update: 2024-12-22 04:17:01 UTC
README
Device Detector is a GPL Cart module that allows to detect user's device type (mobile, tablet) and switch to the corresponding theme. Based on Mobile Detect library
Features
- Defines user's device type and stores it in the user session
- Optionally switches to a specific theme
- Provides Mobile Detect library for other modules
Installation
This module requires 3-d party library which should be downloaded separately. You have to use Composer to download all the dependencies.
- From your web root directory:
composer require gplcart/device
. If the module was downloaded and placed intosystem/modules
manually, runcomposer update
to make sure that all 3-d party files are presented in thevendor
directory. - Go to
admin/module/list
end enable the module - Adjust settings on
admin/module/settings/device
To get stored device type in your custom module: $_SESSION['device']. Available values are: desktop, mobile, tablet