[Помогите] Проблема с модулем Меню категорий Pro

Тема в разделе "OpenCart", создана пользователем cotto51rus, 9 янв 2016.

  1. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8
    Установлен модуль Меню Категорий Pro, но коснулось прописывать seo url для каждой категории и мне стало выдавать вот такую ошибку:
    Notice: Error: Unknown column 'u_title' in 'field list'
    Error No: 1054
    UPDATE oc_category_description SET u_title = '', u_h1 = '',u_h2 = '' WHERE category_id = '17' AND language_id = '1' in /home/c/cotto36k/cotto36k.bget.ru/public_html/system/database/mysql.php on line 50
    Может зря грешу на модуль, но в категории и подкатегории не могу нигде задать seo url
     
  2. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Я так понимаю, при установке модуля в таблицу описания категорий должны были добавиться дополнительные колонки, а они не добавились. Либо модуль был рассчитан под какую-то конкретную сборку, где эти колонки уже есть.
    Самый простой вариант, просто почистить модель модуля от лишних колонок.
    Выложите сюда его модель (я не представляю где она и как называется, ибо не знаком с этим модулем).
     
  3. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8


    Посмотрите, пожалуйста, не понимаю, как скидывать модель сюда, файл что ли?
     
  4. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Не файл, а его содержимое.
    Доступ в админку не поможет, исходный код можно увидеть только через FTP.
    Если хотите, чтоб я поковырялся в вашем магазине, читайте подпись.
     
  5. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8
    К сожалению платно не могу позволить сейчас себе..
    А так скинула сюда:
     
    Lasted edited by : 9 янв 2016
  6. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Этот модуль не работает с этими колонками. Я думал вы в нём что-то прописываете и получаете ошибку.
    У вас проблема в /admin/model/catalog/category.php, но не из-за этого модуля, а из-за какого-то другого модуля работающего через vQmod. Либо дело в этом модуле, но не в нём самом, а в его установке, в процессе которой vQmod покоцал модель категорий.

    Выложите сюда файл /admin/model/catalog/category.php из кеша vQmod (именно оттуда, а не оригинальный, у него в названии будет этот путь в конце, но вместо слешей будут подчёркивания). И выкладывайте не через файлообменник, а просто открыв текстовым редактором (хоть блокнотом) и скопировав сюда его содержимое.
     
  7. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8
    vq2-admin_controller_catalog_category.php
    PHP:
    <?php
    class ControllerCatalogCategory extends Controller {
       private 
    $error = array();
       private 
    $category_id 0;
       private 
    $path = array();
       public function 
    index() {
         
    $this->language->load('catalog/category');

         
    $this->document->setTitle($this->language->get('heading_title'));
        
         
    $this->load->model('catalog/category');
        
         
    $this->getList();
       }

       public function 
    insert() {

           if (
    $this->request->server['REQUEST_METHOD'] == 'POST') { //uuu
           
    if (isset($this->request->post['used_auto_meta']) && is_array($this->request->post['used_auto_meta'])) {
             foreach (
    $this->request->post['used_auto_meta'] as $key => $value) {
               if (
    $value == 'checked') {
                 if (
    $this->config->get('useo_num') ) $num = (int)$this->config->get('useo_num');
                 else 
    $num 180;
                 
    $meta_description substr(strip_tags(html_entity_decode($this->request->post['category_description'][$key]['description'])),0,$num);
                 
    $meta_description trim(preg_replace('/[ ]{2,}|[\t]/'' '$meta_description));              
                 
    $this->request->post['category_description'][$key]['meta_description'] = $meta_description;  
                 
    $meta_keywords preg_replace("/[^A-Za-z0-9 ]/"' '$this->request->post['category_description'][$key]['name']);
                 
    $meta_keywords explode(' ',$meta_keywords);
                 foreach(
    $meta_keywords as $m_key => $m_value) {
                   
    $m_value trim($m_value);
                   if (empty(
    $m_value) ) unset($meta_keywords[$m_key]);
                   else 
    $meta_keywords[$m_key] = $m_value;
                 }  
                 
    $meta_keywords implode(",",$meta_keywords);
                 
    $this->request->post['category_description'][$key]['meta_keyword'] = $meta_keywords;
               }
             }
           }
         }
          
         
    $this->language->load('catalog/category');

         
    $this->document->setTitle($this->language->get('heading_title'));
        
         
    $this->load->model('catalog/category');
        
         if ((
    $this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {

           if (!isset(
    $this->request->post['keyword']) || empty($this->request->post['keyword']) ) { //uuu
             
    $u_non_alpha '/[,]|[\']|[`]|[~]|[!]|[@]|[#]|[$]|[%]|[\^]|[&]|[*]|[(]|[)]|[_]|[-]|[{]|[}]|[\"]|[?]|[\\\]|[\|]|[\/]|[+]|[=]|[\[]|[\]]|[;]|[:]|[>]|[.]|[<]/';
             
    $u_lang $this->config->get('config_language_id');
             
    $u_keyword html_entity_decode($this->request->post['category_description'][$u_lang]['name']);
             
    $u_keyword preg_replace($u_non_alpha'',$u_keyword);
             
    $u_keyword trim(preg_replace('/[ ]{2,}|[\t]/'' '$u_keyword) );
             
    $u_keyword preg_replace('/[ ]/','-',$u_keyword);
            
             if (empty(
    $u_keyword) ) $u_keyword 'category';
             while(
    true) {
               
    $u_query $this->db->query("SELECT keyword FROM " DB_PREFIX "url_alias WHERE keyword = '" $this->db->escape("$u_keyword") ."'");
               if (
    $u_query->num_rows) {
                 
    $u_keyword $u_keyword.rand(1,9);
               }
               else {
                 break;
               }
             }
             
    $this->request->post['keyword'] = $u_keyword;
           }
          
           
    $this->model_catalog_category->addCategory($this->request->post);

           
    $this->session->data['success'] = $this->language->get('text_success');

           
    $this->redirect($this->url->link('catalog/category''token=' $this->session->data['token'], 'SSL'));
         }

         
    $this->getForm();
       }

       public function 
    update() {

           if (
    $this->request->server['REQUEST_METHOD'] == 'POST') { //uuu
           
    if (isset($this->request->post['used_auto_meta']) && is_array($this->request->post['used_auto_meta'])) {
             foreach (
    $this->request->post['used_auto_meta'] as $key => $value) {
               if (
    $value == 'checked') {
                 if (
    $this->config->get('useo_num') ) $num = (int)$this->config->get('useo_num');
                 else 
    $num 180;
                 
    $meta_description substr(strip_tags(html_entity_decode($this->request->post['category_description'][$key]['description'])),0,$num);
                 
    $meta_description trim(preg_replace('/[ ]{2,}|[\t]/'' '$meta_description));              
                 
    $this->request->post['category_description'][$key]['meta_description'] = $meta_description;  
                 
    $meta_keywords preg_replace("/[^A-Za-z0-9 ]/"' '$this->request->post['category_description'][$key]['name']);
                 
    $meta_keywords explode(' ',$meta_keywords);
                 foreach(
    $meta_keywords as $m_key => $m_value) {
                   
    $m_value trim($m_value);
                   if (empty(
    $m_value) ) unset($meta_keywords[$m_key]);
                   else 
    $meta_keywords[$m_key] = $m_value;
                 }  
                 
    $meta_keywords implode(",",$meta_keywords);
                 
    $this->request->post['category_description'][$key]['meta_keyword'] = $meta_keywords;
               }
             }
           }
         }
          
         
    $this->language->load('catalog/category');

         
    $this->document->setTitle($this->language->get('heading_title'));
        
         
    $this->load->model('catalog/category');
        
         if ((
    $this->request->server['REQUEST_METHOD'] == 'POST') && $this->validateForm()) {
           
    $this->model_catalog_category->editCategory($this->request->get['category_id'], $this->request->post);
          
           
    $this->session->data['success'] = $this->language->get('text_success');
          
           
    $this->redirect($this->url->link('catalog/category''token=' $this->session->data['token'], 'SSL'));
         }

         
    $this->getForm();
       }

       public function 
    delete() {
         
    $this->language->load('catalog/category');

         
    $this->document->setTitle($this->language->get('heading_title'));
        
         
    $this->load->model('catalog/category');
        
         if (isset(
    $this->request->post['selected']) && $this->validateDelete()) {
           foreach (
    $this->request->post['selected'] as $category_id) {
             
    $this->model_catalog_category->deleteCategory($category_id);
           }

           
    $this->session->data['success'] = $this->language->get('text_success');

           
    $this->redirect($this->url->link('catalog/category''token=' $this->session->data['token'], 'SSL'));
         }

         
    $this->getList();
       }

       public function 
    repair() {
         
    $this->language->load('catalog/category');

         
    $this->document->setTitle($this->language->get('heading_title'));

         
    $this->load->model('catalog/category');

         if (
    $this->validateRepair()) {
           
    $this->model_catalog_category->repairCategories();

           
    $this->session->data['success'] = $this->language->get('text_success');

           
    $this->redirect($this->url->link('catalog/category''token=' $this->session->data['token'], 'SSL'));
         }

         
    $this->getList();
       }

       protected function 
    getList() {
           
    $this->data['breadcrumbs'] = array();

           
    $this->data['breadcrumbs'][] = array(
           
    'text'  => $this->language->get('text_home'),
           
    'href'  => $this->url->link('common/home''token=' $this->session->data['token'], 'SSL'),
           
    'separator' => false
           
    );

           
    $this->data['breadcrumbs'][] = array(
           
    'text'  => $this->language->get('heading_title'),
           
    'href'  => $this->url->link('catalog/category''token=' $this->session->data['token'] . '&path=''SSL'),
           
    'separator' => ' :: '
           
    );
                      
         
    $this->data['insert'] = $this->url->link('catalog/category/insert''token=' $this->session->data['token'], 'SSL');
         
    $this->data['delete'] = $this->url->link('catalog/category/delete''token=' $this->session->data['token'], 'SSL');
         
    $this->data['repair'] = $this->url->link('catalog/category/repair''token=' $this->session->data['token'], 'SSL');

         if (isset(
    $this->request->get['path'])) {
           if (
    $this->request->get['path'] != '') {
             
    $this->path explode('_'$this->request->get['path']);
             
    $this->category_id end($this->path);
             
    $this->session->data['path'] = $this->request->get['path'];
           } else {
             unset(
    $this->session->data['path']);
           }
         } elseif (isset(
    $this->session->data['path'])) {
           
    $this->path explode('_'$this->session->data['path']);
           
    $this->category_id end($this->path);
         }

         
    $this->data['categories'] = $this->getCategories(0);

         
    $this->data['heading_title'] = $this->language->get('heading_title');

         
    $this->data['text_no_results'] = $this->language->get('text_no_results');

         
    $this->data['column_name'] = $this->language->get('column_name');
         
    $this->data['column_sort_order'] = $this->language->get('column_sort_order');
         
    $this->data['column_action'] = $this->language->get('column_action');

         
    $this->data['button_insert'] = $this->language->get('button_insert');
         
    $this->data['button_delete'] = $this->language->get('button_delete');
         
    $this->data['button_repair'] = $this->language->get('button_repair');
         if (isset(
    $this->error['warning'])) {
           
    $this->data['error_warning'] = $this->error['warning'];
         } else {
           
    $this->data['error_warning'] = '';
         }

         if (isset(
    $this->session->data['success'])) {
           
    $this->data['success'] = $this->session->data['success'];
        
           unset(
    $this->session->data['success']);
         } else {
           
    $this->data['success'] = '';
         }
        
         
    $this->template 'catalog/category_list.tpl';
         
    $this->children = array(
           
    'common/header',
           
    'common/footer'
         
    );
            
         
    $this->response->setOutput($this->render());
       }

       protected function 
    getForm() {
         
    $this->data['heading_title'] = $this->language->get('heading_title');

         
    $this->data['text_none'] = $this->language->get('text_none');
         
    $this->data['text_default'] = $this->language->get('text_default');
         
    $this->data['text_image_manager'] = $this->language->get('text_image_manager');
         
    $this->data['text_browse'] = $this->language->get('text_browse');
         
    $this->data['text_clear'] = $this->language->get('text_clear');    
         
    $this->data['text_enabled'] = $this->language->get('text_enabled');
         
    $this->data['text_disabled'] = $this->language->get('text_disabled');
         
    $this->data['text_percent'] = $this->language->get('text_percent');
         
    $this->data['text_amount'] = $this->language->get('text_amount');
            
         
    $this->data['entry_name'] = $this->language->get('entry_name');
         
    $this->data['entry_meta_keyword'] = $this->language->get('entry_meta_keyword');
         
    $this->data['entry_meta_description'] = $this->language->get('entry_meta_description');
         
    $this->data['entry_description'] = $this->language->get('entry_description');
         
    $this->data['entry_parent'] = $this->language->get('entry_parent');
         
    $this->data['entry_filter'] = $this->language->get('entry_filter');
         
    $this->data['entry_store'] = $this->language->get('entry_store');
         
    $this->data['entry_keyword'] = $this->language->get('entry_keyword');
         
    $this->data['entry_image'] = $this->language->get('entry_image');
      
    $this->data['entry_menu_image'] = $this->language->get('entry_menu_image');
         
    $this->data['entry_top'] = $this->language->get('entry_top');
         
    $this->data['entry_column'] = $this->language->get('entry_column');    
         
    $this->data['entry_sort_order'] = $this->language->get('entry_sort_order');
         
    $this->data['entry_status'] = $this->language->get('entry_status');
         
    $this->data['entry_layout'] = $this->language->get('entry_layout');
         
    $this->data['entry_seo_title'] = $this->language->get('entry_seo_title');
         
    $this->data['entry_seo_h1'] = $this->language->get('entry_seo_h1');
        
         
    $this->data['button_save'] = $this->language->get('button_save');
         
    $this->data['button_cancel'] = $this->language->get('button_cancel');

         
    $this->data['tab_general'] = $this->language->get('tab_general');
         
    $this->data['tab_data'] = $this->language->get('tab_data');
         
    $this->data['tab_design'] = $this->language->get('tab_design');
        
         if (isset(
    $this->error['warning'])) {
           
    $this->data['error_warning'] = $this->error['warning'];
         } else {
           
    $this->data['error_warning'] = '';
         }
      
         if (isset(
    $this->error['name'])) {
           
    $this->data['error_name'] = $this->error['name'];
         } else {
           
    $this->data['error_name'] = array();
         }

           
    $this->data['breadcrumbs'] = array();

           
    $this->data['breadcrumbs'][] = array(
           
    'text'  => $this->language->get('text_home'),
           
    'href'  => $this->url->link('common/home''token=' $this->session->data['token'], 'SSL'),
           
    'separator' => false
           
    );

           
    $this->data['breadcrumbs'][] = array(
           
    'text'  => $this->language->get('heading_title'),
           
    'href'  => $this->url->link('catalog/category''token=' $this->session->data['token'], 'SSL'),
           
    'separator' => ' :: '
           
    );
        
         if (!isset(
    $this->request->get['category_id'])) {
           
    $this->data['action'] = $this->url->link('catalog/category/insert''token=' $this->session->data['token'], 'SSL');
         } else {
           
    $this->data['action'] = $this->url->link('catalog/category/update''token=' $this->session->data['token'] . '&category_id=' $this->request->get['category_id'], 'SSL');
         }
        
         
    $this->data['cancel'] = $this->url->link('catalog/category''token=' $this->session->data['token'], 'SSL');

         if (isset(
    $this->request->get['category_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
           
    $category_info $this->model_catalog_category->getCategory($this->request->get['category_id']);
         }
        
         
    $this->data['token'] = $this->session->data['token'];
        
         
    $this->load->model('localisation/language');
        
         
    $this->data['languages'] = $this->model_localisation_language->getLanguages();

         if (isset(
    $this->request->post['category_description'])) {
           
    $this->data['category_description'] = $this->request->post['category_description'];
         } elseif (isset(
    $this->request->get['category_id'])) {
           
    $this->data['category_description'] = $this->model_catalog_category->getCategoryDescriptions($this->request->get['category_id']);
         } else {
           
    $this->data['category_description'] = array();
         }

         
    // Categories
         
    $categories $this->model_catalog_category->getAllCategories();

         
    $this->data['categories'] = $this->getAllCategories($categories);

         if (isset(
    $category_info)) {
           unset(
    $this->data['categories'][$category_info['category_id']]);
         }

         if (isset(
    $this->request->post['parent_id'])) {
           
    $this->data['parent_id'] = $this->request->post['parent_id'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['parent_id'] = $category_info['parent_id'];
         } else {
           
    $this->data['parent_id'] = 0;
         }

         
    $this->load->model('catalog/filter');

         if (isset(
    $this->request->post['category_filter'])) {
           
    $filters $this->request->post['category_filter'];
         } elseif (isset(
    $this->request->get['category_id'])) {
           
    $filters $this->model_catalog_category->getCategoryFilters($this->request->get['category_id']);
         } else {
           
    $filters = array();
         }

         
    $this->data['category_filters'] = array();

         foreach (
    $filters as $filter_id) {
           
    $filter_info $this->model_catalog_filter->getFilter($filter_id);

           if (
    $filter_info) {
             
    $this->data['category_filters'][] = array(
               
    'filter_id' => $filter_info['filter_id'],
               
    'name'  => $filter_info['group'] . ' &gt; ' $filter_info['name']
             );
           }
         }

         
    $this->load->model('setting/store');
        
         
    $this->data['stores'] = $this->model_setting_store->getStores();
        
         if (isset(
    $this->request->post['category_store'])) {
           
    $this->data['category_store'] = $this->request->post['category_store'];
         } elseif (isset(
    $this->request->get['category_id'])) {
           
    $this->data['category_store'] = $this->model_catalog_category->getCategoryStores($this->request->get['category_id']);
         } else {
           
    $this->data['category_store'] = array(0);
         }      
        
         if (isset(
    $this->request->post['keyword'])) {
           
    $this->data['keyword'] = $this->request->post['keyword'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['keyword'] = $category_info['keyword'];
         } else {
           
    $this->data['keyword'] = '';
         }

         if (isset(
    $this->request->post['image'])) {
           
    $this->data['image'] = $this->request->post['image'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['image'] = $category_info['image'];
         } else {
           
    $this->data['image'] = '';
         }
        
         
    $this->load->model('tool/image');

         if (isset(
    $this->request->post['image']) && file_exists(DIR_IMAGE $this->request->post['image'])) {
           
    $this->data['thumb'] = $this->model_tool_image->resize($this->request->post['image'], 100100);
         } elseif (!empty(
    $category_info) && $category_info['image'] && file_exists(DIR_IMAGE $category_info['image'])) {
           
    $this->data['thumb'] = $this->model_tool_image->resize($category_info['image'], 100100);
         } else {
           
    $this->data['thumb'] = $this->model_tool_image->resize('no_image.jpg'100100);
         }
        
         
    $this->data['no_image'] = $this->model_tool_image->resize('no_image.jpg'100100);
        
      if (isset(
    $this->request->post['menu_image'])) {
      
    $this->data['menu_image'] = $this->request->post['menu_image'];
      } elseif (!empty(
    $category_info)) {
      
    $this->data['menu_image'] = $category_info['menu_image'];
      } else {
      
    $this->data['menu_image'] = 1;
      }
      
         if (isset(
    $this->request->post['top'])) {
           
    $this->data['top'] = $this->request->post['top'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['top'] = $category_info['top'];
         } else {
           
    $this->data['top'] = 0;
         }
        
         if (isset(
    $this->request->post['column'])) {
           
    $this->data['column'] = $this->request->post['column'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['column'] = $category_info['column'];
         } else {
           
    $this->data['column'] = 1;
         }
            
         if (isset(
    $this->request->post['sort_order'])) {
           
    $this->data['sort_order'] = $this->request->post['sort_order'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['sort_order'] = $category_info['sort_order'];
         } else {
           
    $this->data['sort_order'] = 0;
         }
        
         if (isset(
    $this->request->post['status'])) {
           
    $this->data['status'] = $this->request->post['status'];
         } elseif (!empty(
    $category_info)) {
           
    $this->data['status'] = $category_info['status'];
         } else {
           
    $this->data['status'] = 1;
         }
            
         if (isset(
    $this->request->post['category_layout'])) {
           
    $this->data['category_layout'] = $this->request->post['category_layout'];
         } elseif (isset(
    $this->request->get['category_id'])) {
           
    $this->data['category_layout'] = $this->model_catalog_category->getCategoryLayouts($this->request->get['category_id']);
         } else {
           
    $this->data['category_layout'] = array();
         }

         
    $this->load->model('design/layout');
        
         
    $this->data['layouts'] = $this->model_design_layout->getLayouts();
                

           if (isset(
    $this->request->post['useo_auto_meta'])) { //uuu
           
    $this->data['useo_auto_meta'] = $this->request->post['useo_auto_meta'];
         } elseif (
    $this->config->get('useo_auto_meta') && $this->config->get('useo_auto_meta') == 'yes' && is_array($this->data['category_description']) ) {
           
    $useo_temp $this->data['languages'];
           foreach (
    $useo_temp as $us) {
             
    $this->data['useo_auto_meta'][$us['language_id']] = 'checked';
           }
         } else {
           
    $this->data['useo_auto_meta'] = array();
         }
         if (
    $this->config->get('useo_meta_num') ) //uuu
           
    $this->data['useo_meta_num'] = $this->config->get('useo_meta_num');
         else
           
    $this->data['useo_meta_num'] = '180';
          
         
    $this->template 'catalog/category_form.tpl';
         
    $this->children = array(
           
    'common/header',
           
    'common/footer'
         
    );
            
         
    $this->response->setOutput($this->render());
       }

       protected function 
    validateForm() {
         if (!
    $this->user->hasPermission('modify''catalog/category')) {
           
    $this->error['warning'] = $this->language->get('error_permission');
         }

         foreach (
    $this->request->post['category_description'] as $language_id => $value) {
           if ((
    utf8_strlen($value['name']) < 2) || (utf8_strlen($value['name']) > 255)) {
             
    $this->error['name'][$language_id] = $this->language->get('error_name');
           }
         }
        
         if (
    $this->error && !isset($this->error['warning'])) {
           
    $this->error['warning'] = $this->language->get('error_warning');
         }
              
         if (!
    $this->error) {
           return 
    true;
         } else {
           return 
    false;
         }
       }

       protected function 
    validateDelete() {
         if (!
    $this->user->hasPermission('modify''catalog/category')) {
           
    $this->error['warning'] = $this->language->get('error_permission');
         }
         if (!
    $this->error) {
           return 
    true;
         } else {
           return 
    false;
         }
       }

       protected function 
    validateRepair() {
         if (!
    $this->user->hasPermission('modify''catalog/category')) {
           
    $this->error['warning'] = $this->language->get('error_permission');
         }

         if (!
    $this->error) {
           return 
    true;
         } else {
           return 
    false;
         }
       }

       private function 
    getCategories($parent_id$parent_path ''$indent '') {
         
    $category_id array_shift($this->path);

         
    $output = array();

         static 
    $href_category null;
         static 
    $href_action null;

         if (
    $href_category === null) {
           
    $href_category $this->url->link('catalog/category''token=' $this->session->data['token'] . '&path=''SSL');
           
    $href_action $this->url->link('catalog/category/update''token=' $this->session->data['token'] . '&category_id=''SSL');
         }

         
    $results $this->model_catalog_category->getCategoriesByParentId($parent_id);

         foreach (
    $results as $result) {
           
    $path $parent_path $result['category_id'];

           
    $href = ($result['children']) ? $href_category $path '';

           
    $name $result['name'];

           if (
    $category_id == $result['category_id']) {
             
    $name '<b>' $name '</b>';

             
    $this->data['breadcrumbs'][] = array(
               
    'text'  => $result['name'],
               
    'href'  => $href,
               
    'separator' => ' :: '
             
    );

             
    $href '';
           }

           
    $selected = isset($this->request->post['selected']) && in_array($result['category_id'], $this->request->post['selected']);

           
    $action = array();

           
    $action[] = array(
             
    'text' => $this->language->get('text_edit'),
             
    'href' => $href_action $result['category_id']
           );

           
    $output[$result['category_id']] = array(
             
    'category_id' => $result['category_id'],
             
    'name'  => $name,
             
    'sort_order'  => $result['sort_order'],
             
    'selected'  => $selected,
             
    'action'  => $action,
             
    'href'  => $href,
             
    'indent'  => $indent
           
    );

           if (
    $category_id == $result['category_id']) {
             
    $output += $this->getCategories($result['category_id'], $path '_'$indent str_repeat('&nbsp;'8));
           }
         }

         return 
    $output;
       }

       private function 
    getAllCategories($categories$parent_id 0$parent_name '') {
         
    $output = array();

         if (
    array_key_exists($parent_id$categories)) {
           if (
    $parent_name != '') {
             
    $parent_name .= $this->language->get('text_separator');
           }

           foreach (
    $categories[$parent_id] as $category) {
             
    $output[$category['category_id']] = array(
               
    'category_id' => $category['category_id'],
               
    'name'  => $parent_name $category['name']
             );

             
    $output += $this->getAllCategories($categories$category['category_id'], $parent_name $category['name']);
           }
         }

         return 
    $output;
       }

       public function 
    autocomplete() {
         
    $json = array();

         if (isset(
    $this->request->get['filter_name'])) {
           
    $this->load->model('catalog/category');

           
    $data = array(
             
    'filter_name' => $this->request->get['filter_name'],
             
    'start'  => 0,
             
    'limit'  => 20
           
    );

           
    $results $this->model_catalog_category->getCategories($data);

           foreach (
    $results as $result) {
             
    $json[] = array(
               
    'category_id' => $result['category_id'],
               
    'name'  => strip_tags(html_entity_decode($result['name'], ENT_QUOTES'UTF-8'))
             );
           }
         }

         
    $sort_order = array();

         foreach (
    $json as $key => $value) {
           
    $sort_order[$key] = $value['name'];
         }

         
    array_multisort($sort_orderSORT_ASC$json);

         
    $this->response->setOutput(json_encode($json));
       }
    }
    ?>
     
  8. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Вы выложили контроллер, а я просил модель. Она должна назыываться vq2-admin_model_catalog_category.php

    И не забывайте оборачивать код в соответствующий тег (кнопка Вставить, пункт Код и там PHP).
     
  9. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8
    PHP:
    <?php
    class ModelCatalogCategory extends Model {
       public function 
    addCategory($data) {
         
    $this->db->query("INSERT INTO " DB_PREFIX "category SET parent_id = '" . (int)$data['parent_id'] . "', `menu_image` = '" . (isset($data['menu_image']) ? (int)$data['menu_image'] : 0) . "', `top` = '" . (isset($data['top']) ? (int)$data['top'] : 0) . "', `column` = '" . (int)$data['column'] . "', sort_order = '" . (int)$data['sort_order'] . "', status = '" . (int)$data['status'] . "', date_modified = NOW(), date_added = NOW()");

         
    $category_id $this->db->getLastId();
            
         if (isset(
    $data['image'])) {
           
    $this->db->query("UPDATE " DB_PREFIX "category SET image = '" $this->db->escape(html_entity_decode($data['image'], ENT_QUOTES'UTF-8')) . "' WHERE category_id = '" . (int)$category_id "'");
         }
        
         foreach (
    $data['category_description'] as $language_id => $value) {
           
    $this->db->query("INSERT INTO " DB_PREFIX "category_description SET category_id = '" . (int)$category_id "', language_id = '" . (int)$language_id "', name = '" $this->db->escape($value['name']) . "', meta_keyword = '" $this->db->escape($value['meta_keyword']) . "', meta_description = '" $this->db->escape($value['meta_description']) . "', description = '" $this->db->escape($value['description']) . "', seo_title = '" $this->db->escape($value['seo_title']) . "', seo_h1 = '" $this->db->escape($value['seo_h1']) . "'");
         }

           foreach (
    $data['category_description'] as $language_id => $value) { //uuu
           
    $this->db->query("UPDATE " DB_PREFIX "category_description SET u_title = '" $this->db->escape($value['u_title']) . "', u_h1 = '"$this->db->escape($value['u_h1']) ."',u_h2 = '"$this->db->escape($value['u_h2']) ."' WHERE category_id = '". (int)$category_id ."' AND language_id = '". (int)$language_id ."'");
         }
          

         
    // MySQL Hierarchical Data Closure Table Pattern
         
    $level 0;
        
         
    $query $this->db->query("SELECT * FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$data['parent_id'] . "' ORDER BY `level` ASC");
        
         foreach (
    $query->rows as $result) {
           
    $this->db->query("INSERT INTO `" DB_PREFIX "category_path` SET `category_id` = '" . (int)$category_id "', `path_id` = '" . (int)$result['path_id'] . "', `level` = '" . (int)$level "'");
          
           
    $level++;
         }
        
         
    $this->db->query("INSERT INTO `" DB_PREFIX "category_path` SET `category_id` = '" . (int)$category_id "', `path_id` = '" . (int)$category_id "', `level` = '" . (int)$level "'");

         if (isset(
    $data['category_filter'])) {
           foreach (
    $data['category_filter'] as $filter_id) {
             
    $this->db->query("INSERT INTO " DB_PREFIX "category_filter SET category_id = '" . (int)$category_id "', filter_id = '" . (int)$filter_id "'");
           }
         }
            
         if (isset(
    $data['category_store'])) {
           foreach (
    $data['category_store'] as $store_id) {
             
    $this->db->query("INSERT INTO " DB_PREFIX "category_to_store SET category_id = '" . (int)$category_id "', store_id = '" . (int)$store_id "'");
           }
         }
        
         
    // Set which layout to use with this category
         
    if (isset($data['category_layout'])) {
           foreach (
    $data['category_layout'] as $store_id => $layout) {
             if (
    $layout['layout_id']) {
               
    $this->db->query("INSERT INTO " DB_PREFIX "category_to_layout SET category_id = '" . (int)$category_id "', store_id = '" . (int)$store_id "', layout_id = '" . (int)$layout['layout_id'] . "'");
             }
           }
         }
                
         if (
    $data['keyword']) {
           
    $this->db->query("INSERT INTO " DB_PREFIX "url_alias SET query = 'category_id=" . (int)$category_id "', keyword = '" $this->db->escape($data['keyword']) . "'");
         }
        
         
    $this->cache->delete('category');
       }
      
       public function 
    editCategory($category_id$data) {
         
    $this->db->query("UPDATE " DB_PREFIX "category SET parent_id = '" . (int)$data['parent_id'] . "', `menu_image` = '" . (isset($data['menu_image']) ? (int)$data['menu_image'] : 0) . "', `top` = '" . (isset($data['top']) ? (int)$data['top'] : 0) . "', `column` = '" . (int)$data['column'] . "', sort_order = '" . (int)$data['sort_order'] . "', status = '" . (int)$data['status'] . "', date_modified = NOW() WHERE category_id = '" . (int)$category_id "'");

         if (isset(
    $data['image'])) {
           
    $this->db->query("UPDATE " DB_PREFIX "category SET image = '" $this->db->escape(html_entity_decode($data['image'], ENT_QUOTES'UTF-8')) . "' WHERE category_id = '" . (int)$category_id "'");
         }

         
    $this->db->query("DELETE FROM " DB_PREFIX "category_description WHERE category_id = '" . (int)$category_id "'");

         foreach (
    $data['category_description'] as $language_id => $value) {
           
    $this->db->query("INSERT INTO " DB_PREFIX "category_description SET category_id = '" . (int)$category_id "', language_id = '" . (int)$language_id "', name = '" $this->db->escape($value['name']) . "', meta_keyword = '" $this->db->escape($value['meta_keyword']) . "', meta_description = '" $this->db->escape($value['meta_description']) . "', description = '" $this->db->escape($value['description']) . "', seo_title = '" $this->db->escape($value['seo_title']) . "', seo_h1 = '" $this->db->escape($value['seo_h1']) . "'");
         }

           foreach (
    $data['category_description'] as $language_id => $value) { //uuu
           
    $this->db->query("UPDATE " DB_PREFIX "category_description SET u_title = '" $this->db->escape($value['u_title']) . "', u_h1 = '"$this->db->escape($value['u_h1']) ."',u_h2 = '"$this->db->escape($value['u_h2']) ."' WHERE category_id = '". (int)$category_id ."' AND language_id = '". (int)$language_id ."'");
         }
          
        
         
    // MySQL Hierarchical Data Closure Table Pattern
         
    $query $this->db->query("SELECT * FROM `" DB_PREFIX "category_path` WHERE path_id = '" . (int)$category_id "' ORDER BY level ASC");
        
         if (
    $query->rows) {
           foreach (
    $query->rows as $category_path) {
             
    // Delete the path below the current one
             
    $this->db->query("DELETE FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$category_path['category_id'] . "' AND level < '" . (int)$category_path['level'] . "'");
            
             
    $path = array();
            
             
    // Get the nodes new parents
             
    $query $this->db->query("SELECT * FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$data['parent_id'] . "' ORDER BY level ASC");
            
             foreach (
    $query->rows as $result) {
               
    $path[] = $result['path_id'];
             }
            
             
    // Get whats left of the nodes current path
             
    $query $this->db->query("SELECT * FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$category_path['category_id'] . "' ORDER BY level ASC");
            
             foreach (
    $query->rows as $result) {
               
    $path[] = $result['path_id'];
             }
            
             
    // Combine the paths with a new level
             
    $level 0;
            
             foreach (
    $path as $path_id) {
               
    $this->db->query("REPLACE INTO `" DB_PREFIX "category_path` SET category_id = '" . (int)$category_path['category_id'] . "', `path_id` = '" . (int)$path_id "', level = '" . (int)$level "'");
              
               
    $level++;
             }
           }
         } else {
           
    // Delete the path below the current one
           
    $this->db->query("DELETE FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$category_id "'");
          
           
    // Fix for records with no paths
           
    $level 0;
          
           
    $query $this->db->query("SELECT * FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$data['parent_id'] . "' ORDER BY level ASC");
          
           foreach (
    $query->rows as $result) {
             
    $this->db->query("INSERT INTO `" DB_PREFIX "category_path` SET category_id = '" . (int)$category_id "', `path_id` = '" . (int)$result['path_id'] . "', level = '" . (int)$level "'");
            
             
    $level++;
           }
          
           
    $this->db->query("REPLACE INTO `" DB_PREFIX "category_path` SET category_id = '" . (int)$category_id "', `path_id` = '" . (int)$category_id "', level = '" . (int)$level "'");
         }

         
    $this->db->query("DELETE FROM " DB_PREFIX "category_filter WHERE category_id = '" . (int)$category_id "'");
        
         if (isset(
    $data['category_filter'])) {
           foreach (
    $data['category_filter'] as $filter_id) {
             
    $this->db->query("INSERT INTO " DB_PREFIX "category_filter SET category_id = '" . (int)$category_id "', filter_id = '" . (int)$filter_id "'");
           }    
         }
            
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_to_store WHERE category_id = '" . (int)$category_id "'");
        
         if (isset(
    $data['category_store'])) {    
           foreach (
    $data['category_store'] as $store_id) {
             
    $this->db->query("INSERT INTO " DB_PREFIX "category_to_store SET category_id = '" . (int)$category_id "', store_id = '" . (int)$store_id "'");
           }
         }
        
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_to_layout WHERE category_id = '" . (int)$category_id "'");

         if (isset(
    $data['category_layout'])) {
           foreach (
    $data['category_layout'] as $store_id => $layout) {
             if (
    $layout['layout_id']) {
               
    $this->db->query("INSERT INTO " DB_PREFIX "category_to_layout SET category_id = '" . (int)$category_id "', store_id = '" . (int)$store_id "', layout_id = '" . (int)$layout['layout_id'] . "'");
             }
           }
         }
                
         
    $this->db->query("DELETE FROM " DB_PREFIX "url_alias WHERE query = 'category_id=" . (int)$category_id"'");
        
         if (
    $data['keyword']) {
           
    $this->db->query("INSERT INTO " DB_PREFIX "url_alias SET query = 'category_id=" . (int)$category_id "', keyword = '" $this->db->escape($data['keyword']) . "'");
         }
        
         
    $this->cache->delete('category');
       }
      
       public function 
    deleteCategory($category_id) {
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_path WHERE category_id = '" . (int)$category_id "'");
        
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category_path WHERE path_id = '" . (int)$category_id "'");
          
         foreach (
    $query->rows as $result) {  
           
    $this->deleteCategory($result['category_id']);
         }
        
         
    $this->db->query("DELETE FROM " DB_PREFIX "category WHERE category_id = '" . (int)$category_id "'");
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_description WHERE category_id = '" . (int)$category_id "'");
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_filter WHERE category_id = '" . (int)$category_id "'");
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_to_store WHERE category_id = '" . (int)$category_id "'");
         
    $this->db->query("DELETE FROM " DB_PREFIX "category_to_layout WHERE category_id = '" . (int)$category_id "'");
         
    $this->db->query("DELETE FROM " DB_PREFIX "product_to_category WHERE category_id = '" . (int)$category_id "'");
         
    $this->db->query("DELETE FROM " DB_PREFIX "url_alias WHERE query = 'category_id=" . (int)$category_id "'");
        
         
    $this->cache->delete('category');
       }
      
       
    // Function to repair any erroneous categories that are not in the category path table.
       
    public function repairCategories($parent_id 0) {
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category WHERE parent_id = '" . (int)$parent_id "'");
        
         foreach (
    $query->rows as $category) {
           
    // Delete the path below the current one
           
    $this->db->query("DELETE FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$category['category_id'] . "'");
          
           
    // Fix for records with no paths
           
    $level 0;
          
           
    $query $this->db->query("SELECT * FROM `" DB_PREFIX "category_path` WHERE category_id = '" . (int)$parent_id "' ORDER BY level ASC");
          
           foreach (
    $query->rows as $result) {
             
    $this->db->query("INSERT INTO `" DB_PREFIX "category_path` SET category_id = '" . (int)$category['category_id'] . "', `path_id` = '" . (int)$result['path_id'] . "', level = '" . (int)$level "'");
            
             
    $level++;
           }
          
           
    $this->db->query("REPLACE INTO `" DB_PREFIX "category_path` SET category_id = '" . (int)$category['category_id'] . "', `path_id` = '" . (int)$category['category_id'] . "', level = '" . (int)$level "'");
                
           
    $this->repairCategories($category['category_id']);
         }
       }
          
       public function 
    getCategory($category_id) {
         
    $query $this->db->query("SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' &gt; ') FROM " DB_PREFIX "category_path cp LEFT JOIN " DB_PREFIX "category_description cd1 ON (cp.path_id = cd1.category_id AND cp.category_id != cp.path_id) WHERE cp.category_id = c.category_id AND cd1.language_id = '" . (int)$this->config->get('config_language_id') . "' GROUP BY cp.category_id) AS path, (SELECT keyword FROM " DB_PREFIX "url_alias WHERE query = 'category_id=" . (int)$category_id "') AS keyword FROM " DB_PREFIX "category c LEFT JOIN " DB_PREFIX "category_description cd2 ON (c.category_id = cd2.category_id) WHERE c.category_id = '" . (int)$category_id "' AND cd2.language_id = '" . (int)$this->config->get('config_language_id') . "'");
        
         return 
    $query->row;
       }

       public function 
    getCategoriesByParentId($parent_id 0) {
         
    $query $this->db->query("SELECT *, (SELECT COUNT(parent_id) FROM " DB_PREFIX "category WHERE parent_id = c.category_id) AS children FROM " DB_PREFIX "category c LEFT JOIN " DB_PREFIX "category_description cd ON (c.category_id = cd.category_id) WHERE c.parent_id = '" . (int)$parent_id "' AND cd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY c.sort_order, cd.name");

         return 
    $query->rows;
       }

       public function 
    getCategories($data) {
         
    $sql "SELECT cp.category_id AS category_id, GROUP_CONCAT(cd1.name ORDER BY cp.level SEPARATOR ' &gt; ') AS name, c.parent_id, c.sort_order FROM " DB_PREFIX "category_path cp LEFT JOIN " DB_PREFIX "category c ON (cp.category_id = c.category_id) LEFT JOIN " DB_PREFIX "category_description cd1 ON (cp.path_id = cd1.category_id) LEFT JOIN " DB_PREFIX "category_description cd2 ON (cp.category_id = cd2.category_id) WHERE cd1.language_id = '" . (int)$this->config->get('config_language_id') . "' AND cd2.language_id = '" . (int)$this->config->get('config_language_id') . "'";
        
         if (!empty(
    $data['filter_name'])) {
           
    $sql .= " AND cd2.name LIKE '" $this->db->escape($data['filter_name']) . "%'";
         }

         
    $sql .= " GROUP BY cp.category_id ORDER BY c.sort_order, name";
        
         if (isset(
    $data['start']) || isset($data['limit'])) {
           if (
    $data['start'] < 0) {
             
    $data['start'] = 0;
           }        

           if (
    $data['limit'] < 1) {
             
    $data['limit'] = 20;
           }  
        
           
    $sql .= " LIMIT " . (int)$data['start'] . "," . (int)$data['limit'];
         }
                
         
    $query $this->db->query($sql);
        
         return 
    $query->rows;
       }
            
       public function 
    getCategoryDescriptions($category_id) {
         
    $category_description_data = array();
        
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category_description WHERE category_id = '" . (int)$category_id "'");
        
         foreach (
    $query->rows as $result) {
           
    $category_description_data[$result['language_id']] = array(

           
    'u_title'           => $result['u_title'], //uuu
             
    'u_h1'              => $result['u_h1'], //uuu
             
    'u_h2'              => $result['u_h2'], //uuu
          
             
    'seo_title'  => $result['seo_title'],
             
    'seo_h1'  => $result['seo_h1'],
             
    'name'  => $result['name'],
             
    'meta_keyword'  => $result['meta_keyword'],
             
    'meta_description' => $result['meta_description'],
             
    'description'  => $result['description']
           );
         }
        
         return 
    $category_description_data;
       }  
      
       public function 
    getCategoryFilters($category_id) {
         
    $category_filter_data = array();
        
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category_filter WHERE category_id = '" . (int)$category_id "'");
        
         foreach (
    $query->rows as $result) {
           
    $category_filter_data[] = $result['filter_id'];
         }

         return 
    $category_filter_data;
       }

      
       public function 
    getCategoryStores($category_id) {
         
    $category_store_data = array();
        
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category_to_store WHERE category_id = '" . (int)$category_id "'");

         foreach (
    $query->rows as $result) {
           
    $category_store_data[] = $result['store_id'];
         }
        
         return 
    $category_store_data;
       }

       public function 
    getCategoryLayouts($category_id) {
         
    $category_layout_data = array();
        
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category_to_layout WHERE category_id = '" . (int)$category_id "'");
        
         foreach (
    $query->rows as $result) {
           
    $category_layout_data[$result['store_id']] = $result['layout_id'];
         }
        
         return 
    $category_layout_data;
       }
        
       public function 
    getTotalCategories() {
         
    $query $this->db->query("SELECT COUNT(*) AS total FROM " DB_PREFIX "category");
        
         return 
    $query->row['total'];
       }  
        
       public function 
    getTotalCategoriesByImageId($image_id) {
         
    $query $this->db->query("SELECT COUNT(*) AS total FROM " DB_PREFIX "category WHERE image_id = '" . (int)$image_id "'");
        
         return 
    $query->row['total'];
       }

       public function 
    getTotalCategoriesByLayoutId($layout_id) {
         
    $query $this->db->query("SELECT COUNT(*) AS total FROM " DB_PREFIX "category_to_layout WHERE layout_id = '" . (int)$layout_id "'");

         return 
    $query->row['total'];
       }

       public function 
    getAllCategories() {
         
    $query $this->db->query("SELECT * FROM " DB_PREFIX "category c LEFT JOIN " DB_PREFIX "category_description cd ON (c.category_id = cd.category_id) LEFT JOIN " DB_PREFIX "category_to_store c2s ON (c.category_id = c2s.category_id) WHERE cd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND c2s.store_id = '" . (int)$this->config->get('config_store_id') . "'  ORDER BY c.parent_id, c.sort_order, cd.name");

         
    $category_data = array();
         foreach (
    $query->rows as $row) {
           
    $category_data[$row['parent_id']][$row['category_id']] = $row;
         }

         return 
    $category_data;
       }
    }
    ?>
     
    Lasted edited by : 10 янв 2016
  10. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Похоже, в каком-то SEO модуле криво vQmod отработал.
    Для начала попробуйте просто удалить этот файл из кеша, чтоб он заново сгенерировался. Если не поможет, значит ошибка в самой инструкции vQmod.

    В этом файле лишнее вот это:
    PHP:
    foreach ($data['category_description'] as $language_id => $value) { //uuu
           
    $this->db->query("UPDATE " DB_PREFIX "category_description SET u_title = '" $this->db->escape($value['u_title']) . "', u_h1 = '"$this->db->escape($value['u_h1']) ."',u_h2 = '"$this->db->escape($value['u_h2']) ."' WHERE category_id = '". (int)$category_id ."' AND language_id = '". (int)$language_id ."'");
         }
    И вот это:
    PHP:
    'u_title'           => $result['u_title'], //uuu
             
    'u_h1'              => $result['u_h1'], //uuu
             
    'u_h2'              => $result['u_h2'], //uuu
    В общем, всё, где есть - //uuu.

    Редактирование самого файла - это временная мера, поскольку при очистке кеша vQmod или установке нового модуля, который затрагивает этот файл, всё вернётся назад, так что нужно найти причину появления неправильного кода.
     
  11. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8
    спасибо, попробую.. отпишусь

    нашла причину.. была проблема в модуле seo pack удалила и все пошло. Зато возникла другая трудность. Я платила в самом начале человеку, чтобы он мне в горизонтальном меню сделал всё главное меню, а не категории товара, но человек не выходит на связь уже две недели, потерялся, получается вот такая проблема:
    в футере все seo url отображается правильно, как я прописала везде, а такие же страницы в моем горизонтальном меню отображаются по старому, нет оригинального seo url, т.е. вот так:
    index.php?route=information/information&information_id=13/, а не kak-kupit
    Я пересмотрела все файлы через файлзиллу и нашла, что это он добавлял в хеддер
    Вот часть того, что я нашла:
    PHP:
    div.main_menu_item a:hover div
       {
       color:#ccc;
       }

             </style>
           
    <!--Menu 2014 (c) Izyum Web System www.izyum.name -->
    <div class="links">
    <div id="sunladymenu" class = "main_menu_item">
    <ul>
    <li><a href="/index.php">Главная</a></li>
    <li class="main_menu_item">  
       <?php foreach ($categories as $category) { ?>
       <a><?php echo $category['name']; ?></a>  <?php /*echo $category['href'];*/?>
         <?php if ($category['children']) { ?>
           <div class="submenu">
           <?php foreach ($category['children'] as $child) { ?>
             <div class = "my_submenu"><a href="<?php echo $child['href']; ?>" class = "my_links_menu"><?php echo $child['name']; ?></a></div>
           <?php ?>
         </div>
       <?php ?>
       <?php ?>
    </li>        
     
    <li><a href="/index.php?route=checkout/simplecheckout/">Мои заказы</a></li>
    <li><a href="/index.php?route=information/information&information_id=13/">Как купить</a></li>
    <li><a href="/index.php?route=information/information&information_id=6">Оплата и доставка</a></li>
    <li><a href="/index.php?route=information/information&information_id=10/">Отзывы</a></li>
    <li><a href="/index.php?route=information/contact/">Контакты</a></li>

                </ul>
              </div>
             </div>
             <!--Menu 2014 (c) Izyum Web System www.izyum.name -->
            </div>
         
         
            <div id="notification"></div>
         
       <?php if($we_menu_cache $this->config->get('we_menu_cache')){ ?>   <ul class="<?php echo $this->config->get('we_menu_class'?>">     <?php if(!empty($we_menu_cache)){ ?>       <?php foreach($we_menu_cache as $item){         $tpl = (strpos($_SERVER['REQUEST_URI'], $item['href']) !== false) && $_SERVER['REQUEST_URI'] != '/'  'tpl_row_act' 'tpl_row';         echo str_replace('&''&amp;'html_entity_decode($item[$tpl]));         } ?>     <?php ?>   </ul><?php ?>
    Как же здесь вывести seo url?
     
    Lasted edited by : 11 янв 2016
  12. Dotrox

    Dotrox Команда форума

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Хорошего "специалиста" вы себе нашли. Вот это вообще извращение:
    HTML:
    <li><a href="/index.php">Главная</a></li>
    Посмотрите, как ссылки выводятся в футере и поймёте, как их сделать в меню.
    Принцип такой: в контроллере формируется ссылка через $this->url->link(), а затем выводится в шаблоне.
     
    cotto51rus нравится это.
  13. cotto51rus

    cotto51rus

    Регистрация:
    3 янв 2016
    Сообщения:
    232
    Симпатии:
    8
    Всё, спасибо большое за помощь, сделала