B
B
Bearax2020-10-19 11:59:40
opencart
Bearax, 2020-10-19 11:59:40

What is a controller in Opencart?

Hello guys. There is a problem. I'm quite new. Installed callback module. And there he writes this:
Insert the code into the controller file (.php):

$formcreator = new formcreator($this->registry); $data['formcreator_id127'] = $formcreator->initFeedback(127);

Paste in the template file (.twig) the following code:
{{ formcreator_id127 }}

What is a controller? Where is he located?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin, 2020-10-19
@Bearax

/catalog/controller
/admin/controller
The controller is the link between the view and the model.
If my memory serves me right, if you want to call a button in the footer, then you need to find the controller responsible for the footer. Attach a line to it and call the method in the template in the right place (basement).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question