Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

LeoGG012

Newbie
  
  • Posts

    1
  • Joined

  • Last visited

LeoGG012's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Здравствуйте. Подскажите как на ocstore версии 2.1.0.2.1. Необходимо подключить данную библиотеку https://github.com/serbanghita/Mobile-Detect В данный момент испытываю трудности, подключаю в index.php после // Configuration if (is_file('config.php')) { require_once('config.php'); } Такой код include_once('Mobile_Detect.php'); $detect = new Mobile_Detect(); И после строки // Affiliate $registry->set('affiliate', new Affiliate($registry)); Такой код //Mobile if( class_exists('Mobile_Detect') ) { if( $detect->isMobile() OR $detect->isTablet() ) { $config->set('config_template', 'unishop_mobile'); } elseif( !$detect->isMobile() OR !$detect->isTablet() ) { $config->set('config_template', 'unishop'); } } Сайт функционирует нормально и все работает, но есть одно но. Крон и логи панели присылают такую ошибку постоянно Fatal error: Call to a member function isMobile() on string in То есть и при первом посещении сайта показывается один раз такое уведомление, а потом нормально. Не знаю в чем проблема, помогите решить данное безумие, потому что при оплате клиентом к примеру через Робокассу, оплата проходит, но статус у заказа не изменяется из-за данной ошибки. В чем может быть беда? Знатоки, помогите пожалуйста. Спасибо!
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.