Вывод дополнительного описания в фильтре mfp под ocstore

NewJey
На сайте с 21.11.2009
Offline
109
37

Добрый день. Понадобилось на посадочных страницах фильтра mfp вывести еще одно описание (дополнительное). Создал поле в базе, добавил поле в админке, все отлично пишется и сохраняется. Но не могу вывести это поле на сайт, по аналогии с дефолтным описание посадочных страниц.

Вывод основного описания происходит так:

$this->model_module_mega_filter->prepareData

И формируется так:

public function prepareData( $data ) {
                if( ! empty( $data['breadcrumbs'] ) && ! empty( $this->request->get['mfp'] ) ) {
                        foreach( $data['breadcrumbs'] as $mfK => $mfBreadcrumb ) {
                                $data['breadcrumbs'][$mfK]['href'] = $this->removeMfpFromUrl( $data['breadcrumbs'][$mfK]['href'] );
                        }
                }
                
                if( class_exists( 'ControllerModuleMegaFilter' ) ) {
                        if( ControllerModuleMegaFilter::$_meta ) {
                                if( ControllerModuleMegaFilter::$_meta['h1'] ) {
                                        $data['heading_title'] = ControllerModuleMegaFilter::$_meta['h1'];
                                }
                                if( ControllerModuleMegaFilter::$_meta['description'] ) {
                                        $data['description'] = html_entity_decode(ControllerModuleMegaFilter::$_meta['description'], ENT_QUOTES, 'UTF-8');
                                }
                        }
                        
                        self::$_meta = true;
                }
                                
                if( isset( $this->request->get['mfilterAjax'] ) && class_exists( 'MegaFilterCore' ) ) {
                        $calculate_number_of_products = false;
                        $settings = isset( $this->request->get['mfilterIdx'] ) ? $this->getModuleSettings( $this->request->get['mfilterIdx'] ) : array();

                        if( ! empty( $settings['configuration'] ) ) {
                                $calculate_number_of_products = ! empty( $settings['configuration']['calculate_number_of_products'] );
                        } else {
                                $settings = $this->config->get('mega_filter_settings');
                                $calculate_number_of_products = ! empty( $settings['calculate_number_of_products'] );
                        }

                        $seo_settings = $this->config->get('mega_filter_seo');
                        $baseTypes      = array( 'stock_status', 'manufacturers', 'rating', 'attributes', 'price', 'options', 'filters' );

                        if( isset( $this->request->get['mfilterBTypes'] ) ) {
                                $baseTypes = explode( ',', $this->request->get['mfilterBTypes'] );
                        }

                        if( ! empty( $seo_settings['enabled'] ) || $calculate_number_of_products || in_array( 'categories:tree', $baseTypes ) || in_array( 'vehicles', $baseTypes ) ) {
                                if( ! $calculate_number_of_products ) {
                                        $baseTypesCopy = $baseTypes;
                                        $baseTypes = array();

                                        if( in_array( 'categories:tree', $baseTypesCopy ) ) {
                                                $baseTypes[] = 'categories:tree';
                                        }

                                        if( in_array( 'vehicles', $baseTypesCopy ) ) {
                                                $baseTypes[] = 'vehicles';
                                        }
                                }

                                $idx = 0;

                                if( isset( $this->request->get['mfilterIdx'] ) ) {
                                        $idx = (int) $this->request->get['mfilterIdx'];
                                }

                                $data['mfilter_json'] = json_encode( MegaFilterCore::newInstance( $this, NULL, array( 'mfp_overwrite_path' => true ) )->getJsonData($baseTypes, $idx) );
                        }

                        $data['header'] = $data['column_left'] = $data['column_right'] = $data['content_top'] = $data['content_bottom'] = $data['footer'] = '';
                }
                
                if( isset( $data['mfilter_json'] ) ) {
                        $data['header'] .= '<div id="mfilter-json" style="display:none">' . base64_encode( $data['mfilter_json'] ) . '</div>';
                }
                
                $data['content_top'] .= '<div id="mfilter-content-container">';
                $data['content_bottom'] = '</div>' . $data['content_bottom'];
                                        
                return $data;
        }

Вот собственно говоря и вывод основного описания на посадочной странице:

if( ControllerModuleMegaFilter::$_meta['description'] ) {
                                        $data['description'] = html_entity_decode(ControllerModuleMegaFilter::$_meta['description'], ENT_QUOTES, 'UTF-8');
                                }

Не могу вывести данные из базы, переменную description_2.

Как можно ее вывести, подскажите?

Спасибо.

NewJey
На сайте с 21.11.2009
Offline
109
#1
эх((

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий