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

AleksTim

Новичок
  
  • Posts

    4
  • Joined

  • Last visited

1 Follower

AleksTim's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. Разобрался Дело было в этот строке: $this->response->setOutput($this->load->view('test/home', $data)); Забыл передать в неё массив $data ) Спасипотому что!
  2. Сгделал ик, не помогло, все равно на страницу не погрузился ни хегдер ни футер (( В чем может быть прилина? Может кроме контроллера еещё ггде-то нужно что-то добавить? <?php class ControllerTestPage extends Controller { public function index() { $this->document->setTitle($this->config->get('config_meta_title')); $this->document->setDescription($this->config->get('config_meta_description')); $this->document->setKeywords($this->config->get('config_meta_keyword')); if (isset($this->request->get['route'])) { $canonical = $this->url->link('test/page'); if ($this->config->get('config_seo_pro') && !$this->config->get('config_seopro_addslash')) { $canonical = rtrim($canonical, '/'); } $this->document->addLink($canonical, 'canonical'); } $data['footer'] = $this->load->controller('common/footer'); $data['header'] = $this->load->controller('common/header'); $this->response->setOutput($this->load->view('test/page')); } }
  3. Попыился написать контроллер по аналогии с контроллером home.php папка контроллера: catalog\controller\test\page.php папка страницы: catalog\view\theme\default\template\test\page.twig <?php class ControllerTestPage extends Controller { public function index() { $this->document->setTitle($this->config->get('config_meta_title')); $this->document->setDescription($this->config->get('config_meta_description')); $this->document->setKeywords($this->config->get('config_meta_keyword')); if (isset($this->request->get['route'])) { $canonical = $this->url->link('test/page'); if ($this->config->get('config_seo_pro') && !$this->config->get('config_seopro_addslash')) { $canonical = rtrim($canonical, '/'); } $this->document->addLink($canonical, 'canonical'); } $this->response->setOutput($this->load->view('test/page')); } } на проблема в том что к страниэто не подтягивается {{ header }} из header.twig
  4. Доброго времени! Подскажите новичку как подклюлить страницу page.php в шаблон OpenCart 3.0. Есть шаблон ocStore 3.0 в нем есть главное меню, хочу чтобы ссылки из меню вели на ситичные страницы, но при этом на эти ситичные страницы подтягивались header и footer . Как это сгделать? Если меняю формат страницы на .twig и указывать путь к нему, то естественно браузер не знает что икое twig и я получаю ошибку.
×
×
  • 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.