You are going to create a Hello World
module. It has one input field for the heading title and another description text area for the details. The first step in module creation is using a unique name so that there will be no conflict with other modules. The same unique name is used to create the filename and class name to extend the controller and model.
There are generally six to eight files that need to be created for each module, and they follow a similar structure. If there is an interaction with database tables, then we have to create two extra models. The following screenshot shows the hierarchy of files and folders for an OpenCart module:
So now you know the basic directory structure of an OpenCart module. The file structure is divided into two sections: admin
and catalog
. The folders and files in the admin
section deal with the settings of modules and data handling, while the folders and files in the catalog
folder handle the frontend presentation. We will...