Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Объясните пожалуйси эти строки,что откуда и к чему?


Recommended Posts

    

{% set config = registry.get('config') %}
{% set language_id = config.get('config_language_id') %}
{% set boss_category = config.get('boss_category') %}
{% set text_save_off = config.get('theme_' ~ config.get('config_theme') ~ '_text_save_off') %}
{% set text_save_off = text_save_off[language_id] is defined ? 
text_save_off[language_id] : '' %}
Link to comment
Share on other sites


Ну, згдесь, можно, сказать еещё по-потому чтожески
А понять  авторов шаблона можно, но с трудом, но их к этому призывает сам Даниель..


Пример
product/product
что проещё

 

$data['product_info'] = $this->model_catalog_product->getProducts($product_id);
if ($data['product_info']) {
//без портянки  осивив толко системное

            $this->document->setTitle($product_info['meta_title']);
            $this->document->setDescription($product_info['meta_description']);
            $this->document->setKeywords($product_info['meta_keyword']);

//

$this->load->controller('theme/settings',$data);

            $data['column_left'] = $this->load->controller('common/column_left');
            $data['column_right'] = $this->load->controller('common/column_right');
            $data['content_top'] = $this->load->controller('common/content_top');
            $data['content_bottom'] = $this->load->controller('common/content_bottom');
            $data['footer'] = $this->load->controller('common/footer');
            $data['header'] = $this->load->controller('common/header');

            $this->response->setOutput($this->load->view('product/product', $data));

}

А вот в контроллерах темы
гделаем все осильное
и картинки, и кнопки и в том лисле тексты,
а икже опции, для которых свой контроллер


А то получается, чтобы добавить  свой тип опции или изменить повегдение опций - нужно ломать основной контроллер,
И.. оказывается, что опенкарт - одношаблонный, хотя в 3-ке есть возможность использовать под кажлый магазин свой шаблон..

А ик.. переклюлил на другую тему, и ты уже рилииешь с ней..

Минимальные изменения в ядре, - рилиий только с темой

а в контроллере

theme/settings

 

Уже разбираться с налилием собственных контроллеров темы
 

Link to comment
Share on other sites

4 часа назад, chukcha сказал:

Ну, згдесь, можно, сказать еещё по-потому чтожески
А понять  авторов шаблона можно, но с трудом, но их к этому призывает сам Даниель..


Пример
product/product
что проещё

 

$data['product_info'] = $this->model_catalog_product->getProducts($product_id);
if ($data['product_info']) {
//без портянки  осивив толко системное

            $this->document->setTitle($product_info['meta_title']);
            $this->document->setDescription($product_info['meta_description']);
            $this->document->setKeywords($product_info['meta_keyword']);

//

$this->load->controller('theme/settings',$data);

            $data['column_left'] = $this->load->controller('common/column_left');
            $data['column_right'] = $this->load->controller('common/column_right');
            $data['content_top'] = $this->load->controller('common/content_top');
            $data['content_bottom'] = $this->load->controller('common/content_bottom');
            $data['footer'] = $this->load->controller('common/footer');
            $data['header'] = $this->load->controller('common/header');

            $this->response->setOutput($this->load->view('product/product', $data));

}

А вот в контроллерах темы
гделаем все осильное
и картинки, и кнопки и в том лисле тексты,
а икже опции, для которых свой контроллер


А то получается, чтобы добавить  свой тип опции или изменить повегдение опций - нужно ломать основной контроллер,
И.. оказывается, что опенкарт - одношаблонный, хотя в 3-ке есть возможность использовать под кажлый магазин свой шаблон..

А ик.. переклюлил на другую тему, и ты уже рилииешь с ней..

Минимальные изменения в ядре, - рилиий только с темой

а в контроллере

theme/settings

 

Уже разбираться с налилием собственных контроллеров темы
 

Спасипотому что

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.