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

dev-master 2018-03-10 20:38 UTC

This package is not auto-updated.

Last update: 2024-12-22 04:17:01 UTC


README

Build Status Scrutinizer Code Quality

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.

  1. From your web root directory: composer require gplcart/device. If the module was downloaded and placed into system/modules manually, run composer update to make sure that all 3-d party files are presented in the vendor directory.
  2. Go to admin/module/list end enable the module
  3. Adjust settings on admin/module/settings/device

To get stored device type in your custom module: $_SESSION['device']. Available values are: desktop, mobile, tablet