T
T
Theory Theory2021-06-14 13:47:12
opencart
Theory Theory, 2021-06-14 13:47:12

Controller not being called from opencart template?

Created a head.php controller in catalog/controller/common folder:

<?php
class ControllerCommonHead extends Controller {
  public function index() {
    var_dump(123);
    die;
    
    return $this->load->view('common/head', $data);
  }
}


I call it from the usual home.twig:
{{ head }}

As a result, nothing, If you go to http:// localhost/?route=common/head everything works

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Theory Theory, 2021-06-14
@Narbek

It was necessary to specify this controller in catalog/controller/home.php:

$data['head'] = $this->load->controller('common/head');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question