[Помогите] Ошибка в Attribute category

Тема в разделе "OpenCart", создана пользователем Постер, 23 фев 2014.

  1. Постер

    Постер

    Регистрация:
    9 авг 2013
    Сообщения:
    140
    Симпатии:
    7
    Заранее извиняюсь за возможно нубский вопрос. В общем после установки модуля при редактировании\создании категории не появилось вкладки "Атрибуты".

    В ошибках Vqmod:
    Код:
    ---------- Date: 2014-02-23 20:23:32 ~ IP : 79.172.99.130 ----------
    REQUEST URI : /admin/index.php?route=catalog/category&token=89b9cf3ds37b7f8f776zxc5bbbae8081
    MOD DETAILS:
       modFile   : /public_html/vqmod/xml/attribute_category.xml
       id        : Attribute Category
       version   : 1.0.0
       vqmver    : 1.0.9
       author    : [email protected]
    
    File Name    : admin/controller/catalog/category.php(0)
    VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): $this->load->language('catalog/category');

    В Журнале ошибок:
    Код:
    2014-02-23 20:22:12 - PHP Notice:  Undefined variable: filter_sku in /public_html/vqmod/vqcache/vq2-admin_controller_catalog_product.php on line 753
    2014-02-23 20:22:12 - PHP Notice:  Undefined variable: filter_manufacturer in  /public_html/vqmod/vqcache/vq2-admin_controller_catalog_product.php on line 761
    
    Подскажите пожалуйста, как устранить. Заранее спасибо.
     
  2. nix

    nix php, MySQL, UNIX, MikroTik ROSAPI

    Регистрация:
    16 янв 2013
    Сообщения:
    1.000
    Симпатии:
    890
    написано ж на нашем языке
    тоесть
    вкмоду не удалось найти $this->load->language('catalog/category');
    в файле
    admin/controller/catalog/category.php
    скинь сюда файл
    vqmod/xml/attribute_category.xml
    и
    admin/controller/catalog/category.php
     
    five555 и Globe-Star нравится это.
  3. Постер

    Постер

    Регистрация:
    9 авг 2013
    Сообщения:
    140
    Симпатии:
    7
     
  4. nix

    nix php, MySQL, UNIX, MikroTik ROSAPI

    Регистрация:
    16 янв 2013
    Сообщения:
    1.000
    Симпатии:
    890
    не attribute_category.php а то что я написал выше
     
    Globe-Star нравится это.
  5. Постер

    Постер

    Регистрация:
    9 авг 2013
    Сообщения:
    140
    Симпатии:
    7
    сорри
     
  6. nix

    nix php, MySQL, UNIX, MikroTik ROSAPI

    Регистрация:
    16 янв 2013
    Сообщения:
    1.000
    Симпатии:
    890
    вот отредактирован
    ошибка вкмода пропадет но останется системы, так как есть еще ошибки в файле
    admin/controller/catalog/product.php
    или в вкмоде который изменяет его
     
    wbvetal86, Globe-Star и Постер нравится это.
  7. wbvetal86

    wbvetal86

    Регистрация:
    19 фев 2013
    Сообщения:
    55
    Симпатии:
    8
    Важно! Если на странице категории криво отображается новая вкладка Атрибутов, то надо открыть vqmod файл attribute_category.xml

    --- Добавлено, 15 дек 2014 ---
    Помогите пожалуйста ocshop Версия 1.5.6.4:

    Ошибка Вкмода

    ******************************1_Mon.log*******************************
    ---------- Date: 2014-12-15 18:30:19 ~ IP : 77.121.110.91 ----------
    REQUEST URI : /admin/index.php?route=catalog/category/update&token=3a5e8084a2e62b9f100967bfa6b88684&category_id=59
    MOD DETAILS:
    modFile : /home/komaxaco/domains/abc-x.com/public_html/ot/vqmod/xml/attribute_category.xml
    id : Attribute Category
    version : 1.0.0
    vqmver : 1.0.9
    author : [email protected]

    File Name : admin/view/template/catalog/category_form.tpl(0)
    VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): <div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a></div>

    ----------------------------------------------------------------------

    [​IMG]

    Сам файл attribute_category.xml
    HTML:
    <?xml version="1.0" encoding="UTF-8"?>
    <modification>
            <id>Attribute Category</id>
            <version>1.0.0</version>
            <vqmver>1.0.9</vqmver>
            <author>[email protected]</author>
            <file name="admin/controller/catalog/category.php">
                   
                
                    <operation>
                 
                            <search position="before"><![CDATA[
                              $this->language->load('catalog/category');
                            ]]></search>
                         
                            <add><![CDATA[
                              $this->language->load('module/attribute_category');
                            ]]></add>
                         
                    </operation>
    
    
                    <operation>
                   
                            <search position="after"><![CDATA[
                              $this->load->model('catalog/category');
                            ]]></search>
                           
                            <add><![CDATA[
                              $this->load->model('catalog/attribute_category');
                            ]]></add>
                           
                    </operation>
    
                    <operation>
                   
                            <search position="after"><![CDATA[
                              $this->model_catalog_category->addCategory($this->request->post);
                            ]]></search>
                           
                            <add><![CDATA[
                              $this->model_catalog_attribute_category->addAttributes($this->request->post);
                            ]]></add>
                           
                    </operation>
    
                    <operation>
                   
                            <search position="after"><![CDATA[
                              $this->model_catalog_category->editCategory($this->request->get['category_id'], $this->request->post);
                            ]]></search>
                           
                            <add><![CDATA[
                              $this->model_catalog_attribute_category->editAttributes($this->request->get['category_id'], $this->request->post);
                            ]]></add>
                           
                    </operation>
    
                    <operation>
                   
                            <search position="after"><![CDATA[
                              $this->model_catalog_category->deleteCategory($category_id);
                            ]]></search>
                           
                            <add><![CDATA[
                              $this->model_catalog_attribute_category->deleteAttributes($category_id);
                            ]]></add>
                           
                    </operation>
    
                    <operation>
                   
                            <search position="after"><![CDATA[
                              $this->data['tab_design'] = $this->language->get('tab_design');
                            ]]></search>
                           
                            <add><![CDATA[
            $this->data['tab_attributes'] = $this->language->get('tab_attributes');
            $this->data['column_attribute'] = $this->language->get('column_attribute');       
            $this->data['column_attribute_group'] = $this->language->get('column_attribute_group');       
            $category_id = isset($this->request->get['category_id']) ? (int) $this->request->get['category_id'] : 0;
            $this->data['attributes'] = $this->model_catalog_attribute_category->getAttributes($category_id);
                            ]]></add>
                           
                    </operation>
                   
            </file>       
    
            <file name="admin/view/template/catalog/category_form.tpl">
                   
                    <operation>
                   
                            <search position="replace"><![CDATA[
    <div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a></div>
                            ]]></search>
                           
                            <add><![CDATA[
    <div id="tabs" class="htabs"><a href="#tab-general"><?php echo $tab_general; ?></a><a href="#tab-data"><?php echo $tab_data; ?></a><a href="#tab-attributes"><?php echo $tab_attributes; ?></a><a href="#tab-design"><?php echo $tab_design; ?></a></div>
                            ]]></add>
                           
                    </operation>
                   
                    <operation>
                   
                            <search position="before"><![CDATA[
                              <div id="tab-design">
                            ]]></search>
                           
                            <add><![CDATA[
            <div id="tab-attributes">
              <table class="list">
              <thead>
                <tr>
                  <td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'attribute_category_attributes\']').attr('checked', this.checked);" /></td>
                  <td class="left"><?php echo $column_attribute; ?></td>
                  <td class="left"><?php echo $column_attribute_group; ?></td>
                </tr>
              </thead>
              <tbody>
                <?php if ($attributes) { ?>
                  <?php foreach ($attributes as $attribute) { ?>
                  <tr>
                    <td style="text-align: center;">
                      <input type="checkbox" name="attribute_category_attributes[<?php echo $attribute['attribute_id'];?>]" value="1" <?php echo $attribute['checked'];?> />
                    <td class="left"><?php echo $attribute['name']; ?></td>
                    <td class="left"><?php echo $attribute['attribute_group']; ?></td>
                  </tr>
                  <?php } ?>
                <?php } else { ?>
                  <tr>
                    <td class="center" colspan="3"><?php echo $text_no_results; ?></td>
                  </tr>
                <?php } ?>
              </tbody>
            </table>
            </div>
                            ]]></add>
                           
                    </operation>
            </file>
    
            <file name="admin/view/template/catalog/product_form.tpl">
                    <operation>
                   
                            <search position="before"><![CDATA[
                            function addAttribute() {
                            ]]></search>
                           
                            <add><![CDATA[
    // add category attribute select and button
    var category_attribute_wrapper = $('<div><div>', {id: 'category_attribute_wrapper'});
    var category_attribute_select  = $('<select></select>',{id: 'category_attribute_select'});
    var category_options = $('select[name="main_category_id"]').children().clone();
    category_attribute_select.append(category_options);
    var category_attribute_button  = $('table#attribute tfoot td').eq(1).find('a').clone();
    category_attribute_button.attr('onclick', '').attr('id', 'add_category_attributes_button');
    category_attribute_wrapper.append(category_attribute_select).append(category_attribute_button);
    $('table#attribute tfoot td').eq(0).append(category_attribute_wrapper);
    
    
    $('#add_category_attributes_button').live('click',function(){
      var select = $('#category_attribute_select');
      var category_id = select.val();
      getCategoryAttributes(category_id);
    });
    
    $('select[name="main_category_id"]').live('change',function(){
      var select = $(this);
      var category_id = select.val();
      getCategoryAttributes(category_id);
    });
    
    function getCategoryAttributes(category_id) {
      $.ajax({
                    url: 'index.php?route=module/attribute_category/getAttributes&token=<?php echo $token; ?>&category_id=' +  category_id,
                    dataType: 'json',
                    success: function(json) {   
    
                        $.each(json, function(key, attribute) {                        
                          var row = attribute_row;
                addAttribute();
                $('input[name="product_attribute[' + row + '][name]"]').val(attribute['name']);
                $('input[name="product_attribute[' + row + '][attribute_id]"]').val(attribute['attribute_id']);           
                if(window.addAttributeSelect) {
                  addAttributeSelect(attribute['attribute_id'], row);
                }
                            
              });
             
                    }
                });   
    }
    
                            ]]></add>
                           
                    </operation>
                   
            </file>
    </modification>
    
     
  8. wbvetal86

    wbvetal86

    Регистрация:
    19 фев 2013
    Сообщения:
    55
    Симпатии:
    8
    Проблема VQMod файла, ручками пришлось все проинтегрировать в оригинальные файлы и все заработало, как не старался править attribute_category.xml не помогало, писало что не может найти строку и все