I would not suggest to do it this way since simply pulling the codes into the same constructor altogether can also overwrite features in that constructor that uses the same keys from your TWIG files as they might misguide your users and search engines.

The proper way to do this would be by taking a look, for instance, at your catalog/controller/common/header,php file. As you can see in this example:

The common/cart is being imported into the header. If you take a look at the catalog/controller/common/cart.php file, you will notice that the $this->response->setOutput is NOT being used which means the graphic inside that TWIG file won't be outputted until being called from the $data['cart'] imported into the catalog/controller/common/header.php file, in this case, from the catalog/view/theme/<your_theme>/template/common/header.twig file by using the {{ cart.your_key }} variable.

By relying on this method, despite the mount of array keys being identically involved, each will be placed into their own separated arrays, in this case, called: cart .

With tha being said, you'd simply need to reproduce the catalog/controller/checkout/cart.php file into a new controller called: cart_account.php into your catalog/controller/account folder . Then, to rename the Controller class accordingly on the top of the file and to keep the index() method only. Then, to replace the following:

With the: {{ cart_account }} variable, you could call any keys like this: {{ cart_account.your_key }} without any conflicts with your features.

Note: Replace your_key with your actual key .

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.