Example #1
0
 /**
  * Return widget default template
  *
  * @return string
  */
 protected function getDefaultTemplate()
 {
     if (!\XLite::isAdminZone() && method_exists('\\XLite\\Core\\Request', 'isMobileDevice') && \XLite\Core\Request::isMobileDevice()) {
         return 'modules/Amazon/PayWithAmazon/checkout_mobile.tpl';
     } else {
         return 'modules/Amazon/PayWithAmazon/checkout.tpl';
     }
 }
Example #2
0
 /**
  * For compatibiilty with mobile devices iframe is not used 
  *
  * @return bool
  */
 public static function isMobileDeviceCompatible()
 {
     $mobileExists = method_exists('\\XLite\\Core\\Request', 'isMobileDevice') && \XLite\Core\Request::isMobileDevice();
     $mobileEnabled = method_exists(\XLite\Core\Request::getInstance(), 'isMobileEnabled') && \XLite\Core\Request::isMobileEnabled();
     return $mobileExists && $mobileEnabled;
 }
Example #3
0
 public function isMobileSkinUsed()
 {
     // mobile condition: method_exists('\XLite\Core\Request', 'isMobileDevice') && \XLite\Core\Request::isMobileDevice()
     // TODO: check switch to desktop version button
     $module = \XLite\Core\Database::getRepo('XLite\\Model\\Module')->findOneBy(array('author' => 'XC', 'name' => 'Mobile'));
     if ($module && $module->getEnabled() && !\XLite::isAdminZone() && \XLite\Core\Request::isMobileDevice()) {
         return true;
     } else {
         return false;
     }
 }