Simple Blog для AVA STORE v4.2

Тема в разделе "OpenCart", создана пользователем kwakin, 8 дек 2015.

  1. kwakin

    kwakin Guest

    кто нибудь может этот модуль блога приспособить к ava store v4.2
    вот из за этого файла simple_blog_catalog_changes.xml ошибка вылезает
    я так понял он в шабе что то не находит
    если этот simple_blog_catalog_changes.xml отключить то блог работает (если так можно сказать)
    да кстати этот блог поддерживает адаптивность
    в блоге есть seo
     
    Lasted edited by : 8 дек 2015
  2. kwakin

    kwakin Guest

    этот блог для версии 1564
    там есть выбор
    соответственно что сам шаб ставится на1564
     
  3. kwakin

    kwakin Guest

    двиг ocStore-1.5.5.1.2
    вот смотрите ошибка
    вроде конфликтов с ocStore нет

    стоит мне отключить этот файл simple_blog_catalog_changes.xml и сайт заработает
    вот ошибка
    Parse error: syntax error, unexpected '}' in /home/u399521491/public_html/vqmod/vqcache/vq2-catalog_controller_common_header.php on line295
     
  4. kwakin

    kwakin Guest

    а header.php какой нужен ?


    если этот файл vq2-catalog_controller_common_header.php то там в строке 295 просто скобка
    }
     
  5. kwakin

    kwakin Guest

    здесь можно файл прикрепить ?
    --- Добавлено, 8 дек 2015 ---
    ошибка вот в этом файле
    vq2-catalog_controller_common_header.php
    он находится в папке
    vqmod/vqcache
     
  6. kwakin

    kwakin Guest

    в папке каталог-контролер-коммон
    в файле header.php нет 295 строки
    там код заканчивается на 176 строке

    вот копия файла header.php (в папке каталог-контролер-коммон)

    --- Добавлено, 8 дек 2015 ---
    Код:
    <?php 
    class ControllerCommonHeader extends Controller {
        protected function index() {
            $this->data['title'] = $this->document->getTitle();
         
            if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
                $server = $this->config->get('config_ssl');
            } else {
                $server = $this->config->get('config_url');
            }
    
            $this->data['base'] = $server;
            $this->data['description'] = $this->document->getDescription();
            $this->data['keywords'] = $this->document->getKeywords();
            $this->data['links'] = $this->document->getLinks();   
            $this->data['styles'] = $this->document->getStyles();
            $this->data['scripts'] = $this->document->getScripts();
            $this->data['lang'] = $this->language->get('code');
            $this->data['direction'] = $this->language->get('direction');
            $this->data['google_analytics'] = html_entity_decode($this->config->get('config_google_analytics'), ENT_QUOTES, 'UTF-8');
            $this->data['name'] = $this->config->get('config_name');
         
            if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) {
                $this->data['icon'] = $server . 'image/' . $this->config->get('config_icon');
            } else {
                $this->data['icon'] = '';
            }
         
            if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
                $this->data['logo'] = $server . 'image/' . $this->config->get('config_logo');
            } else {
                $this->data['logo'] = '';
    
            }     
         
            $this->language->load('common/header');
            $this->data['og_url'] = (isset($this->request->server['HTTPS']) ? HTTPS_SERVER : HTTP_SERVER) . substr($this->request->server['REQUEST_URI'], 1, (strlen($this->request->server['REQUEST_URI'])-1));
            $this->data['og_image'] = $this->document->getOgImage();
         
            $this->data['text_myaccount'] = $this->language->get('text_myaccount');
            $this->data['text_home'] = $this->language->get('text_home');
            $this->data['text_category'] = $this->language->get('text_category');
            $this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
            $this->data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0));
            $this->data['text_shopping_cart'] = $this->language->get('text_shopping_cart');
            $this->data['text_search'] = $this->language->get('text_search');
            $this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));
            $this->data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', 'SSL'), $this->customer->getFirstName(), $this->url->link('account/logout', '', 'SSL'));
            $this->data['text_account'] = $this->language->get('text_account');
            $this->data['text_checkout'] = $this->language->get('text_checkout');
            $this->data['text_page'] = $this->language->get('text_page');
                 
            $this->data['home'] = $this->url->link('common/home');
            $this->data['compare'] = $this->url->link('product/compare', '', 'SSL');
            $this->data['wishlist'] = $this->url->link('account/wishlist', '', 'SSL');
            $this->data['logged'] = $this->customer->isLogged();
            $this->data['account'] = $this->url->link('account/account', '', 'SSL');
            $this->data['shopping_cart'] = $this->url->link('checkout/cart');
            $this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
            $this->data['text_contact'] = $this->language->get('text_contact');
            $this->data['contact'] = $this->url->link('information/contact');
         
            // Daniel's robot detector
            $status = true;
         
            if (isset($this->request->server['HTTP_USER_AGENT'])) {
                $robots = explode("\n", trim($this->config->get('config_robots')));
    
                foreach ($robots as $robot) {
                    if ($robot && strpos($this->request->server['HTTP_USER_AGENT'], trim($robot)) !== false) {
                        $status = false;
    
                        break;
                    }
                }
            }
         
            // A dirty hack to try to set a cookie for the multi-store feature
            $this->load->model('setting/store');
         
            $this->data['stores'] = array();
         
            if ($this->config->get('config_shared') && $status) {
                $this->data['stores'][] = $server . 'catalog/view/javascript/crossdomain.php?session_id=' . $this->session->getId();
             
                $stores = $this->model_setting_store->getStores();
                     
                foreach ($stores as $store) {
                    $this->data['stores'][] = $store['url'] . 'catalog/view/javascript/crossdomain.php?session_id=' . $this->session->getId();
                }
            }
                 
            // Search     
            if (isset($this->request->get['search'])) {
                $this->data['search'] = $this->request->get['search'];
            } else {
                $this->data['search'] = '';
            }
         
            // Menu
            if (isset($this->request->get['path'])) {
                $parts = explode('_', (string)$this->request->get['path']);
            } else {
                $parts = array();
            }
    
            $this->load->model('catalog/category');
         
            $this->load->model('catalog/product');
         
            $this->load->model('tool/image');
         
            $this->data['categories'] = array();
                     
            $categories = $this->model_catalog_category->getCategories(0);
         
            foreach ($categories as $category) {
                if ($category['top']) {
                    // Level 2
                    $children_data = array();
                 
                    $children = $this->model_catalog_category->getCategories($category['category_id']);
                 
                    foreach ($children as $child) {
                     
                        if($child['image']) {
                            $cat_image = $this->model_tool_image->resize($child['image'],30,30);
                        }else{
                            $cat_image = $this->model_tool_image->resize('no_image_white.jpg',1,1);
                        }
                     
                        //Будем вычислять кол-во товаров в категориях только если это кол-во надо показывать
                        if ($this->config->get('config_product_count')) {
                            $data = array(
                                'filter_category_id'  => $child['category_id'],
                                'filter_sub_category' => true
                            );
                         
                            $product_total = $this->model_catalog_product->getTotalProducts($data);
                        }
                                     
                        $children_data[] = array(
                            'name'  => $child['name'] . ($this->config->get('config_product_count') ? ' <span class="kolvo">' . $product_total . '</span>' : ''),
                            'thumb' => $cat_image,
                            'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) 
                        );                     
                    }
                 
                    // Level 1
                    $this->data['categories'][] = array(
                        'name'     => $category['name'],
                        'children' => $children_data,
                        'active'   => in_array($category['category_id'], $parts),
                        'column'   => $category['column'] ? $category['column'] : 1,
                        'href'     => $this->url->link('product/category', 'path=' . $category['category_id'])
                    );
                }
            }
         
            $this->children = array(
                'module/language',
                'module/currency',
                'module/cart'
            );
                 
            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
                $this->template = $this->config->get('config_template') . '/template/common/header.tpl';
            } else {
                $this->template = 'ava/template/common/header.tpl';
            }
         
            $this->render();
        }   
    }
    ?>
    

    как вы и просили
     
    Lasted edited by : 8 дек 2015
  7. Dotrox

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

    Регистрация:
    27 ноя 2012
    Сообщения:
    3.198
    Симпатии:
    1.306
    Блин, разговор слепого с глухим.

    vQmod влепил лишнюю закрывающую скобку. Для начала можно её удалить из файла /vqmod/vqcache/vq2-catalog_controller_common_header.php. Если это решит проблему (то есть кроме скобки всё правильно), нужно найти эту правку в инструкции vQmod и удалить её там, чтоб при очистке кеша vQmod скобка не вернулась.
     
  8. kwakin

    kwakin Guest

    удалил скобку вылезли еще ошибки
    -------------------------------------------------------
    ладно пока этим модулем заниматься не буду
    pav blog не плохо работает на ava store