D
D
Dmitry2015-11-16 18:53:38
PHP
Dmitry, 2015-11-16 18:53:38

Why isn't the cart.php module displayed on the OpenCart site?

Good afternoon!
There is a site on OpenCart. In module /catalog/controller/module/header.php added

$this->children = array(
  'module/language',
  'module/currency',
  'module/cart'
);

but the file /catalog/controller/module/cart.php does not work in any way, the template is not displayed. In this case, there are no errors.
There is a nuance - everything worked, before I rearranged a couple of lines in places in header.php. Only returning to the initial state did not help to return the module. What can be wrong?
UPD: the $this->children = Array( ... ) construct did not write the new array into a protected variable of the inherited class.
The line $this->children[] = 'module/cart';
corrected the situation. But the question remains, why is that?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question