Latest Blog Posts

Editing the OpenCart Homepage
29.09.2025 2665 3 44 min

Editing the OpenCart homepage, customizing H1 and Title text, displaying products and modu..

How to Uninstall Powered by OpenCart
03.09.2025 4134 3 20 min

Remove Powered by OpenCart and customize footer: edit template, use theme editor or OCMOD ..

How to remove modules in OpenCart
28.08.2025 2114 3 12 min

Step-by-step instructions for deleting modules in OpenCart 3 via the admin panel, manually..

Which hosting to choose for OpenCart
25.08.2025 1432 3 19 min

Find out which hosting to choose for an OpenCart online store. Requirements, selection cri..

Adaptation of modules from OpenCart version 2.2.0.0 to 2.3.x.x

6370 0 2 min
Adaptation of modules from OpenCart version 2.2.0.0 to 2.3.x.x

In principle, there is nothing particularly complicated. Here's the manual:

1. You need to add layers in the form of the " extension " directory. It is necessary to lengthen the paths and, accordingly, adjust the code (and then check it again from scratch). And this applies not only to controllers, but also to models, translation, and views. Below is from their documentation.

Regarding the location. What happened:

admin/controller/module/xxx.php
admin/model/module/xxx.php
admin/language/en-gb/module/xxx.php
admin/view/template/module/xxx.tpl

As it is now:

admin/controller/extension/module/xxx.php
admin/model/extension/module/xxx.php
admin/language/en-gb/extension/module/xxx.php
admin/view/template/extension/module/xxx.tpl

Regarding controller and model names, you now need to add Extension . So that ControllerModuleMyModule becomes ControllerExtensionModuleMyModule , and ModelModuleMyModule becomes ModelExtensionModuleMyModule . The same limitation in class names.

Regarding connecting models, now you need to add the prefix "extension/", for example,

 $this->load->model('extension/module/MyModule')

This is also reflected in the creation of dynamic variables of class objects. That is, instead of model_module_MyModule , now you need to use model_extension_module_MyModule .

This point applies not only to the administrative part “admin”, but also to the main part, i.e. the directory “catalog”.

2. Now summernote must be connected separately. Coping with this task is quite easy. Just add the necessary scripts:

 $this->document->addStyle('view/javascript/summernote/summernote.css');
$this->document->addScript('view/javascript/summernote/summernote.min.js');
$this->document->addScript('view/javascript/summernote/opencart.js');

3. Modification of the left menu in the admin panel. Now, the menu in the admin panel is located not at the addresses " controller/common/menu.php " and " view/template/common/menu.tpl ", but at " controller/common/column_left.php " and " view/template/common/ column_left.tpl ". It is worth noting that the menu is now built dynamically in the template according to the controller data, i.e. it is not simply presented as a list of ul-li tags. So those who made manual edits and inserts into the template will have to put it aside and carefully study the controller, namely the structure of individual menu entries.

Of course, there are other issues, but these are probably some of the ones that almost every module faces.

ChatGPT Consultant

Comments

Leave your comment or question

Write Comment

Popular