Home Opencart Install, configure, uninstall, remove OpenCart module video tutorial guide

Install, configure, uninstall, remove OpenCart module video tutorial guide

In this opencart tutorial, we will show how to upload, install, configure, uninstall, delete and remove opencart 3 modules or extensions with which it became base for programmers to start making a custom module or theme.

Uploading a module in OpenCart

OpenCart is a module-based system that allows us to extend functionalities with an unlimited module instance system. What unlimited module instance system means is we can show many modules of one module on the same page and on many different pages. Let’s take an example of Banner module, we can show multiple banners in multiple places of one page and in other pages also.

To upload a module I will show you two ways, one through FTP and another through Admin panel which also needs FTP enabled. I am using OpenCart 3.0.2.0, a similar way for 2.2.

[slideshare id=126787901&doc=7-installingopencartmodule2-181226215806]

First, let’s install through FTP

Another way is through the Admin Panel:

Login into store administration panel and go to Extensions >> Extension installer.

module-installer

Now click on the upload button, a popup will show where you select zip file which ends with *.ocmod.zip or XML file which ends with *.ocmod.xml. Then click Ok. If you got a success message then files are uploaded properly.

module-upload-success

Now go to Extension >> Modifications, then click the clear button near the refresh button and check the Log tab.

If you see any errors then you have to solve them before clicking refresh. Some error may be like below:

2016-09-09 3:05:26 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
FILE: system/library/config.php\
REGEX: ~(require|include)(_once)?\(([^)]+)~
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
FILE: system/library/template/php.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
FILE: system/library/template/tiwg.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
MOD: Newsticker
FILE: admin/controller/common/column_left.php
CODE: if ($this->user->hasPermission('access', 'design/layout')) {
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_affiliate']
CODE: if ($this->user->hasPermission('access', 'design/layout')) {
NOT FOUND - OPERATIONS ABORTED!
----------------------------------------------------------------

If you don’t see any error then click refresh.

refresh-button

Whenever you enable/disable or delete a modification you need to click the refresh button to rebuild your modification cache!

If you click refresh and see error then you have to delete folder inside system\storage\modification, don’t delete index.html, then check the log again and solve it before you click refresh. If errors keep on showing then better not to use the module or hire experts.

Another way is Uploading XML file at system/ folder

You can directly upload the XML file in the system/ folder as well. Some modules like https://webocreation.com/opencart-free-extension-to-add-full-width-position-in-layout 

Sometime you may get the following errors while uploading module:

FTP needs to be enabled in the settings:

Your FTP is not enabled at your store, see this post on how to enable FTP in Opencart.

Invalid file type! :

You uploaded incorrect files and folders. Check whether the file name or zip ends with .ocmod.zip or ocmod.xml

While uploading the module if any files get overridden then it will show like below:

fileoverriden

Be sure you did not overridden your core files.

Could not connect as yoursitename.com:21

It means that it is unable to connect to your FTP. Check your FTP username, password, and port.

For an OCMOD file to be uploaded the file, the file extension must be either *.ocmod.zip or ocmod.xml. I think this is done to prevent uploading non OCMOD files from the store admin.

The file structure of OCMOD compressed zip ocmod.zip files may look like below but can differ as per the functionalities of the module:

ocmod_file_structure
  • Upload folder (All files under this directory will be uploaded to the directory of your OpenCart installation)
  • SQL (Database queries to add any create, drop, insert and update queries)
  • PHP (If the modification requires any custom PHP code then it needs to be placed here)
  • XML (The XML modification files which have a similar structure to VQMOD but have some changes)

Another file that we can upload is XML file then make sure it ends with NAME.ocmod.xml.

After installing the module and following the above steps, if you did not see any changes then you need to check the error logs of Ocmod at system/storage/logs

The modification requires a unique ID code!:

It means you have to open your .ocmod.xml file and change the text to unique text which is inside <code></code>

module-installer

The final step of the installation process is to apply the changes we have just made. In order to do so, go to Extensions -> Modifications and click the Refresh sign at the upper right corner of the page.

Installing a module:

Installing a module in OpenCart 2.x using the Extension installer is easy and intuitive. Go to Administration >> Extensions >> Modules in below OpenCart 2.3 but in above OpenCart 2.3 go to Administration >> Extensions then in the dropdown filter of “Choose the extension type”, select “Module”, you will see list of modules.

modue-filteration

Now you can install the module by clicking, Green + sign to install, red – sign to uninstall and red delete sign to delete, blue +  sign to add another instance of the module and blue pencil sign to edit the module.

module-install-uninstall

Uninstalling a module

Uninstalling is the easiest task that I have ever done. Go to Extensions >> Choose Modules, find the module that you want to uninstall in the Modules list and click on the uninstall red minus button. Then go to Extensions >> Modifications, click on the Uninstall button of the module that you want to uninstall and click Refresh sign. You are set and your module gets uninstalled.

Remove a module

First, uninstall the module then you have to delete every file that you upload when you install the module to remove a module.

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here