Ejemplo n.º 1
0
 /**
  * Detect if browser is mobile device
  *
  * @return boolean
  */
 public static function detectMobileDevice()
 {
     return \XLite\Core\MobileDetect::getInstance()->isMobile();
 }
Ejemplo n.º 2
0
 /**
  * Add to cart widget is disabled:
  * - in admin area
  * - on the mobile phones
  * - on the cart and checkout pages (see getAdd2CartPopupExcludedTargets method)
  *
  * @see static::getAdd2CartPopupExcludedTargets
  *
  * @return boolean
  */
 public static function isAdd2CartPopupEnabled()
 {
     return !\XLite::isAdminZone() && !in_array(\XLite\Core\Request::getInstance()->target, static::getAdd2CartPopupExcludedTargets()) && !\XLite\Core\MobileDetect::getInstance()->isMobilePhone();
 }