Успешные интернет-магазины начинаются здесь!

Модули и шаблоны для опенкарт, форумы техподдержки, сообщества OpenCart .

SignUp Now!

Помощь Mega Filter Pro - внешний вид страницы

marauder

Смотрящий
Команда форума
Support
sales
MegeFilterPRO в OC 2.3 берет данные из
catalog/controller/module/mega_filter.php
и выводит их через
catalog/view/theme/default/template/product/special.tpl,
чтобы изменить внешний вид страницы, которая появляется при поиске с главной, нужно вносить изменения в эти 2 файла
1. нужно в файле /catalog/controller/module/mega_filter.php
добавить следующее:
После строки
$this->load->model('tool/image');
добавим
Код:
$this->load->language('*ВАША ТЕМА*/*ВАША ТЕМА*');
        $this->load->model('setting/setting');
            
                $language_id = $this->config->get('config_language_id');
            
                $data['subcategory_left'] = '';
                $data['disable_cart_button_text'] = '';
                $data['disable_cart_button'] = '';
                $data['description_position'] = '';
            
                $*ВАША ТЕМА* = array();
                $*ВАША ТЕМА* = $this->model_setting_setting->getSetting('*ВАША ТЕМА*', $this->config->get('config_store_id'));
            
                if (isset($*ВАША ТЕМА*['t1_left_subcategory'])) {
                    $data['subcategory_left'] = $*ВАША ТЕМА*['t1_left_subcategory'];
                }
            
                if (isset($*ВАША ТЕМА*['t1_disable_cart_button'])) {
                    $data['disable_cart_button'] = $*ВАША ТЕМА*['t1_disable_cart_button'];
                }

                if (isset($*ВАША ТЕМА*['t1_disable_cart_button_text'])) {
                    $data['disable_cart_button_text'] = $*ВАША ТЕМА*['t1_disable_cart_button_text'][$language_id];
                }
            
                $data['on_off_qview'] = false;
                if (isset($*ВАША ТЕМА*['t1_on_off_qview'])) {
                    $data['on_off_qview'] = $*ВАША ТЕМА*['t1_on_off_qview'];
                }
            
                $data['on_off_fastorder'] = false;
                if (isset($*ВАША ТЕМА*['t1_on_off_fastorder'])) {
                    $data['on_off_fastorder'] = $*ВАША ТЕМА*['t1_on_off_fastorder'];
                }
            
                $data['on_off_fastorder_out_of_stok'] = false;
                if (isset($*ВАША ТЕМА*['t1_on_off_fastorder_out_of_stok'])) {
                    $data['on_off_fastorder_out_of_stok'] = $*ВАША ТЕМА*['t1_on_off_fastorder_out_of_stok'];
                }
                    
                $data['second_button'] = false;
                if (isset($*ВАША ТЕМА*['t1_second_button'])) {
                    $data['second_button'] = $*ВАША ТЕМА*['t1_second_button'];
                }
            
                $data['fastorder_text'] = $this->language->get('fastorder_text');

                $data['qview_text'] = $this->language->get('qview_text');
            
                if (isset($*ВАША ТЕМА*['t1_category_description_position'])) {
                    $data['description_position'] = $*ВАША ТЕМА*['t1_category_description_position'];
                }
            
            
            
            
                $data['special_sticker'] = false;
                $data['ups_sticker'] = false;
                $data['ean_sticker'] = false;
                $data['jan_sticker'] = false;
                $data['isbn_sticker'] = false;
                $data['mpn_sticker'] = false;
            
            
                if (isset($*ВАША ТЕМА*['t1_special_sticker'])) {
                    $data['special_sticker'] = $*ВАША ТЕМА*['t1_special_sticker'];
                }
                if (isset($*ВАША ТЕМА*['t1_ups_sticker'])) {
                    $data['ups_sticker'] = $*ВАША ТЕМА*['t1_ups_sticker'];
                }
                if (isset($*ВАША ТЕМА*['t1_ean_sticker'])) {
                    $data['ean_sticker'] = $*ВАША ТЕМА*['t1_ean_sticker'];
                }
                if (isset($*ВАША ТЕМА*['t1_jan_sticker'])) {
                    $data['jan_sticker'] = $*ВАША ТЕМА*['t1_jan_sticker'];
                }
                if (isset($*ВАША ТЕМА*['t1_isbn_sticker'])) {
                    $data['isbn_sticker'] = $*ВАША ТЕМА*['t1_isbn_sticker'];
                }
                if (isset($*ВАША ТЕМА*['t1_mpn_sticker'])) {
                    $data['mpn_sticker'] = $*ВАША ТЕМА*['t1_mpn_sticker'];
                }
*ВАША ТЕМА* - заменяем на название вашей темы
далее ищем строку
$data['products'][] = array(
ДО нее добавляем
Код:
if ($result['price'] && $result['special']) {
                    $special_sticker_text = round(100 - ($result['special'] / $result['price']) * 100) * (-1);
                } else {
                    $special_sticker_text = false;
                }

                $ups_sticker_text = $result['upc'];
                $ean_sticker_text = $result['ean'];
                $jan_sticker_text = $result['jan'];
                $isbn_sticker_text = $result['isbn'];
                $mpn_sticker_text = $result['mpn'];
далее ПОСЛЕ все той же строки добавляем
Код:
'quantity'                           => $result['quantity'],
                'reviews'                           => sprintf($this->language->get('category_reviews_text'), $result['reviews']),
                'special_sticker_text'  => $special_sticker_text,
                'ups_sticker_text'            => $ups_sticker_text,
                'ean_sticker_text'             => $ean_sticker_text,
                'jan_sticker_text'             => $jan_sticker_text,
                'isbn_sticker_text'         => $isbn_sticker_text,
                'mpn_sticker_text'            => $mpn_sticker_text,
Редактируем языковые файлы если хотим изменить текст на странице выдачи фильтрации /catalog/language/ru-ru/product/special.php
как выше уже упомянули репетируем это если хотим изменить содержимое catalog/view/theme/ваша тема/template/product/special.tpl
 
Сверху