Допоможіть будь ласка при вході в Опенкарт така тема class ControllerCommonHeader extends Controller { public function index() { $this->document->addStyle('view/stylesheet/label_ns.css'); if (file_exists(DIR_APPLICATION . 'view/stylesheet/seolang/icons.css')) { $this->document->addStyle('view/stylesheet/seolang/icons.css'); } $data['title'] = $this->document->getTitle(); if ($this->request->server['HTTPS']) { $data['base'] = HTTPS_SERVER; } else { $data['base'] = HTTP_SERVER; } if ($this->request->server['HTTPS']) { $server = HTTPS_CATALOG; } else { $server = HTTP_CATALOG; } if (is_file(DIR_IMAGE . $this->config->get('config_icon'))) { $this->document->addLink($server . 'image/' . $this->config->get('config_icon'), 'icon'); } $data['description'] = $this->document->getDescription(); $data['keywords'] = $this->document->getKeywords(); $data['links'] = $this->document->getLinks(); $data['styles'] = $this->document->getStyles(); $data['scripts'] = $this->document->getScripts(); $data['lang'] = $this->language->get('code'); $data['direction'] = $this->language->get('direction'); $this->load->language('common/header'); $data['text_logged'] = sprintf($this->language->get('text_logged'), $this->user->getUserName()); if (!isset($this->request->get['user_token']) || !isset($this->session->data['user_token']) || ($this->request->get['user_token'] != $this->session->data['user_token'])) { $data['logged'] = ''; $data['home'] = $this->url->link('common/login', '', true); } else { $data['logged'] = true; $this->load->model('extension/module/question_answer'); $question_answer = (array)$this->config->get('qadata'); $data['question_answer'] = (array)$this->config->get('qadata'); if (isset($question_answer['status']) && $question_answer['status']) { $data['title_icon_header_qa'] = $this->language->get('title_icon_header_qa'); $data['countquestion_answer'] = $this->model_extension_module_question_answer->getTotalNewQuestionAnswer(); $data['question_answer_url'] = $this->url->link('extension/module/question_answer', 'tablist=1&user_token=' . $this->session->data['user_token'], 'SSL'); } $this->load->model('sale/newfastorder'); $data['countfastorder'] = $this->model_sale_newfastorder->countTotalNewFastorder(); $data['newfastorder'] = $this->url->link('sale/newfastorder', 'user_token=' . $this->session->data['user_token'], 'SSL'); $data['title_fastorder'] = $this->language->get('title_fastorder'); $this->load->model('extension/module/found_cheaper_product'); $found_cheaper_product = (array)$this->config->get('fcpdata'); $data['found_cheaper_product'] = (array)$this->config->get('fcpdata'); if (isset($found_cheaper_product['status']) && $found_cheaper_product['status']) { $data['title_icon_header_fcp'] = $this->language->get('title_icon_header_fcp'); $data['countfound_cheaper'] = $this->model_extension_module_found_cheaper_product->getTotalNewFoundCheaper(); $data['found_cheaper_product_url'] = $this->url->link('extension/module/found_cheaper_product', 'tablist=1&user_token=' . $this->session->data['user_token'], 'SSL'); } $data['home'] = $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'], true); $data['logout'] = $this->url->link('common/logout', 'user_token=' . $this->session->data['user_token'], true); $this->load->model('catalog/reviews_store'); $this->load->language('catalog/reviews_store'); $data['countreviewsoff'] = $this->model_catalog_reviews_store->countTotalStatusOff(); $data['link_reviews'] = $this->url->link('catalog/reviews_store', 'user_token=' . $this->session->data['user_token'], true); $data['text_reviews_store'] = $this->language->get('text_reviews_store'); $this->load->model('sale/callback'); $data['countcallback'] = $this->model_sale_callback->countTotal(); $data['countcallback_all'] = $this->model_sale_callback->countTotalAll(); $data['countcallback_final'] = $this->model_sale_callback->countTotalFinal(); $data['callback'] = $this->url->link('sale/callback', 'user_token=' . $this->session->data['user_token'], true); $data['callback_new'] = $this->url->link('sale/callback', 'user_token=' . $this->session->data['user_token'] . '&filter_status=0', true); $data['callback_final'] = $this->url->link('sale/callback', 'user_token=' . $this->session->data['user_token'] . '&filter_status=1', true); $data['text_callback'] = $this->language->get('text_callback'); $data['profile'] = $this->url->link('common/profile', 'user_token=' . $this->session->data['user_token'], true); $this->load->model('user/user'); $this->load->model('tool/image'); $user_info = $this->model_user_user->getUser($this->user->getId()); if ($user_info) { $data['firstname'] = $user_info['firstname']; $data['lastname'] = $user_info['lastname']; $data['username'] = $user_info['username']; $data['user_group'] = $user_info['user_group']; if (is_file(DIR_IMAGE . $user_info['image'])) { $data['image'] = $this->model_tool_image->resize($user_info['image'], 45, 45); } else { $data['image'] = $this->model_tool_image->resize('profile.png', 45, 45); } } else { $data['firstname'] = ''; $data['lastname'] = ''; $data['user_group'] = ''; $data['image'] = ''; } // Online Stores $data['stores'] = array(); $data['stores'][] = array( 'name' => $this->config->get('config_name'), 'href' => HTTP_CATALOG ); $this->load->model('setting/store'); $results = $this->model_setting_store->getStores(); foreach ($results as $result) { $data['stores'][] = array( 'name' => $result['name'], 'href' => $result['url'] ); } } return $this->load->view('common/header', $data); } }