Skip to content
/ device Public

A GPL Cart module that defines user's device type (mobile, tablet)

License

Notifications You must be signed in to change notification settings

gplcart/device

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A GPL Cart module that defines user's device type (mobile, tablet)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages