Друзья, Доброго дня! У меня Версия OCstore 1.5.4.1.2 Сделал мобильную версию сайта с помощью модуля omtex-mobile. Сейчас решил улучшить корзину заказов модулем popupcart extended. Все бы ничего, но на мобильных устройствах сайт не открывается вообще и выдаёт ошибку: PHP Notice: Undefined variable: vqmod in /home/megapu/mospraz.ru/docs/vqmod/vqcache/vq2-system_engine_controller.php on line 71 Ссылка на сам сайт: mospraz.ru Мне необходимо такое решение, чтоб модуль мобильной версии не обращался к модулю улучшенной корзины, а использовал дефолтную. Хотя, было бы прекрасно решение этой проблемы иначе, если такова имеется. Сам файл vq2-system_engine_controller.php, а строка на которую ведёт ошибка: $file_default = $vqmod->modCheck(DIR_DEFAULT_TEMPLATE . $this->template); Код: <?php abstract class Controller { protected $registry; protected $id; protected $layout; protected $template; protected $children = array(); protected $data = array(); protected $output; public function __construct($registry) { $this->registry = $registry; } public function __get($key) { return $this->registry->get($key); } public function __set($key, $value) { $this->registry->set($key, $value); } protected function forward($route, $args = array()) { return new Action($route, $args); } protected function redirect($url, $status = 302) { header('Status: ' . $status); header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url)); exit(); } protected function getChild($child, $args = array()) { $action = new Action($child, $args); if (file_exists($action->getFile())) { require_once(\VQMod::modCheck($action->getFile())); $class = $action->getClass(); $controller = new $class($this->registry); $controller->{$action->getMethod()}($action->getArgs()); return $controller->output; } else { trigger_error('Error: Could not load controller ' . $child . '!'); exit(); } } protected function render() { foreach ($this->children as $child) { $this->data[basename($child)] = $this->getChild($child); } if (file_exists(DIR_TEMPLATE . $this->template)) { extract($this->data); ob_start(); require(\VQMod::modCheck(DIR_TEMPLATE . $this->template)); $this->output = ob_get_contents(); ob_end_clean(); return $this->output; } else { $file_default = $vqmod->modCheck(DIR_DEFAULT_TEMPLATE . $this->template); if (file_exists($file_default)) { extract($this->data); ob_start(); require(\VQMod::modCheck($file_default)); $this->output = ob_get_contents(); ob_end_clean(); return $this->output; } else { trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!'); exit(); } } } } ?> Эдентичная строка нашлась в файле omtex_version.xml модуля мобильной версии Код: <?xml version="1.0" encoding="UTF-8"?> <modification> <id>Omtex - Version Control 1551,156</id> <version>1.2</version> <vqmver>2.0</vqmver> <author>Opcrat Team</author> <file name="system/engine/controller.php"> <operation> <search position="replace" offset="1"><![CDATA[trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!');]]></search> <add><![CDATA[ $file_default = $vqmod->modCheck(DIR_DEFAULT_TEMPLATE . $this->template); if (file_exists($file_default)) { extract($this->data); ob_start(); require($file_default); $this->output = ob_get_contents(); ob_end_clean(); return $this->output; } else { trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!'); exit(); } ]]></add> </operation> </file> <file name="catalog/controller/common/footer.php"> <operation> <search position="after" offset="1"><![CDATA[$this->data['newsletter']]]></search> <add><![CDATA[ $this->data['change_device_mode_mobile'] = $this->config->get('config_change_device_mode_mobile'); $this->data['change_device_mode_tablet'] = $this->config->get('config_change_device_mode_tablet'); $this->language->load('common/header'); $this->children = array('module/language','module/currency'); $this->data['text_nav_info'] = $this->language->get('Информация'); $this->data['text_nav_support'] = $this->language->get('Поддержка'); $this->language->load('account/logout'); $this->data['text_account'] = $this->language->get('text_account'); $this->data['text_logout'] = $this->language->get('text_logout'); $this->data['logged'] = $this->customer->isLogged(); if(isset($this->request->get['currency_code'])){ $this->data['currency_code'] = $this->request->get['currency_code']; }else { $this->data['currency_code'] = ''; } if(isset($this->request->get['language_code'])){ $this->data['language_code'] = $this->request->get['language_code']; }else { $this->data['language_code'] = ''; } ]]></add> </operation> </file> <file name="catalog/controller/checkout/payment_method.php"> <operation> <search position="after" offset="1"><![CDATA[$this->data['button_continue']]]></search> <add><![CDATA[ $this->language->load('common/header'); $this->data['text_i_agree'] = $this->language->get('text_i_agree'); ]]></add> </operation> </file> <file name="catalog/controller/checkout/cart.php"> <operation> <search position="after"> <![CDATA[$this->data['countries'] = $this->model_localisation_country->getCountries();]]> </search> <add> <![CDATA[ $this->load->model('localisation/zone'); $this->data['zones'] = $this->model_localisation_zone->getZonesByCountryId($this->data['country_id']); ]]> </add> </operation> </file> <file name="catalog/controller/checkout/shipping_address.php"> <operation> <search position="after"> <![CDATA[$this->data['countries'] = $this->model_localisation_country->getCountries();]]> </search> <add> <![CDATA[ $this->load->model('localisation/zone'); $this->data['zones'] = $this->model_localisation_zone->getZonesByCountryId($this->data['country_id']); ]]> </add> </operation> </file> <file name="catalog/controller/checkout/payment_address.php"> <operation> <search position="after"> <![CDATA[$this->data['countries'] = $this->model_localisation_country->getCountries();]]> </search> <add> <![CDATA[ $this->load->model('localisation/zone'); $this->data['zones'] = $this->model_localisation_zone->getZonesByCountryId($this->data['country_id']); ]]> </add> </operation> </file> <file name="admin/controller/setting/setting.php"> <operation> <search position="before"><![CDATA[template()]]></search> <add><![CDATA[ public function template_mobile() { $template_mobile = basename($this->request->get['template_mobile']); if (file_exists(DIR_IMAGE . 'templates_mobile/' . $template_mobile . '.png')) { $image = HTTP_CATALOG . 'image/templates_mobile/' . $template_mobile . '.png'; } else { $image = HTTP_CATALOG . 'image/no_image.jpg'; } $this->response->setOutput('<img src="' . $image . '" alt="" title="" style="border: 1px solid #EEEEEE;" />'); } public function template_tablet() { $template_tablet = basename($this->request->get['template_tablet']); if (file_exists(DIR_IMAGE . 'templates_tablet/' . $template_tablet . '.png')) { $image = HTTP_CATALOG . 'image/templates_tablet/' . $template_tablet . '.png'; } else { $image = HTTP_CATALOG . 'image/no_image.jpg'; } $this->response->setOutput('<img src="' . $image . '" alt="" title="" style="border: 1px solid #EEEEEE;" />'); } ]]></add> </operation> </file> <file name="catalog/controller/common/header.php"> <operation> <search position="replace" offset="4"><![CDATA[if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {]]></search> <add><![CDATA[ if($this->session->data['device']=='mobile'){ if ($this->config->get('config_logo_mobile') && file_exists(DIR_IMAGE . $this->config->get('config_logo_mobile'))) { $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo_mobile'); } elseif($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) { $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo'); } if ($this->config->get('config_icon_mobile') && file_exists(DIR_IMAGE . $this->config->get('config_icon_mobile'))) { $this->data['icon_mobile'] = $server . 'image/' . $this->config->get('config_icon_mobile'); } else { $this->data['icon_mobile'] = ''; } }elseif($this->session->data['device']=='tablet'){ if ($this->config->get('config_logo_tablet') && file_exists(DIR_IMAGE . $this->config->get('config_logo_tablet'))) { $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo_tablet'); } elseif($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) { $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo'); } if ($this->config->get('config_icon_tablet') && file_exists(DIR_IMAGE . $this->config->get('config_icon_tablet'))) { $this->data['icon_tablet'] = $server . 'image/' . $this->config->get('config_icon_tablet'); } else { $this->data['icon_tablet'] = ''; } }elseif($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))){ $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo'); } ]]></add> </operation> </file> </modification>