Unlike Opencart 1.x, opencart 2.x has a built-in modules installer and its own modification system OCMOD. Usually, modules are being distributed in two formats:

  • Module_name.ocmod.zip
  • Modification_name.ocmod.xml

An extension *.ocmod.xml is a modification.

Extensions *.ocmod.zip can have this structure:

  • Upload folder. It contains files of the module or another extension. It is a required item.
  • Install.sql file. It is a set of mysql queries that will be executed during the installation of the module. It may contain demo data of the extension or queries to create new tabes in the database or to modify existed ones. An optional item.
  • Install.php file. It is a script that will be executed during the installation of the module. It may contain various actions that must be performed for correct work of the module. An optional item.
  • Install.xml file. It is an ocmod modification. An optional item.

It is worth mentioning that vQmod modifications are popular too in the opencart 2. You can install them by the same way as in Opencart 1.x: just place the modification into vqmod/xml/.

How to install *.ocmod.xml modification

Step 1

Go to Extensions -> Extension Installer in admin side and upload your modification.

OR

Place *.ocmod.xml modification into system dir of your site. Keep in mind, if you use this method, the modification will not be displayed in the modifications list.Usually, developers use this way. Also, you can do that if you need to rase the priority of the modification execution.

Step 2

Go to Extensions -> Modifications and refresh modifications cache.


How to install *.ocmod.zip extension

Step 1

In admin area, go to System -> Settings -> Edit -> FTP, set up and enable FTP. 

OR 

Install the free modification localcopy.ocmod.xml from iSenseLabs. It allows to install modules without FTP.

Step 2

Go to Extensions -> Extension Installer in admin side and upload your module.

OR

Unzip your archive and upload the contents of the upload dir into the root folder of your site using ftp client or another filemanager.

If there is the install.sql file in the archive, import it in System -> Tools -> Backup / Restore or using phpmyadmin.

If there is the install.xml file in the archive, rename it to module_name.ocmod.xml (module_name is the name of your module) and install according to the manual “How to install *.ocmod.xml modification”.

Step 3

In admin side, go to System -> Users -> User Groups and set up permissions (access and modify) to administators and/or other groups. 

Step 4 

Go to Extensions -> Modifications and refresh modifications cache. It is necessary even if your module did not contain a modification file. Already installed modifications can modify files of the module.

Step 5

Go to Extensions -> Modules to enable and setup the module.