Describing files and folder and OpenCart Framework
Hi everyone, Namaste. Namaste is the word used in our Country Nepal to greet someone. Me Rupak Nepali. In our second video, we install OpenCart, and is now up and running at our custom URL “webocreation.loc”. Today in our third video we are going to describe files and folders of the OpenCart framework.
The first thing we do is look through the files and folders structure.
Admin section files and folders are in the admin/ folder. It has controller/ language/ model/ and view/ folder, if you are developing for admin sections then these are the folders you are going to touch.
catalog/ folder holds all frontend presentation style files and folders.
We will discuss in detail about these folders when we will start making hello world module.
The image/ folder contains cache/, catalog/ and payment/ folder with no_image.png and placeholder.png files. Placeholders and no images are used if there are no images found. For example, let’s go to the category page.
You see this is the placeholder image.
Catalog/ folder inside the image/ folder contains the main images that we upload either from the backend or frontend. Like category image, product image, images inserted from the text area, etc.
The cache/ folder inside the image/ folder contains resized images of the main images. For example, in the demo/ demo folder, we have iPhone6.jpg which is the main image. But while showing in the category page or on the product page its size is resized. All these images are stored in the cache folder. We can see at cache/ folder demo, then banners see the name iPhone6-1140*380.jpg which is resized the image for the banner at the home page.
In this way, images are handled in the image/ folder.
Install/ folder contains an opencart.sql file which creates tables on the specified database and inserts demo data. Other files have codes that facilitate to install OpenCart.
The system/ folder is the base where the OpenCart framework is defined. It contains config/, engine/, helper/, library/ and storage/ folders. We will provide details of these folders in the next video with the code flow.
.htaccess.txt is a configuration file used on web servers running the Apache Web Server software where you rename the htaccess.txt to .htaccess. Mostly we use this for the SEO URL redirects in OpenCart
Other is the config.php file where constant is defined and is different as per installation.
index.php where we can find what version of OpenCart are we using and start of our application.
The last one is the php.ini file, which is the configuration file for running applications. It is used to control variables, magic_quotes_gpc, register_globals, default_charset, memory_limit, max_execution_time, and many other. Shared hosting does not provide these facilities to change it but if you are hosting in Private servers then you can set to use them.
Following image shows how our files of the module are placed in OpenCart:
So, our third video is completed, hope you liked it. As always please don’t forget to post your questions or comments so that I can add extra topics or things that I need to develop which will help me to develop the quality of videos series. You can follow at my twitter account @rupaknpl and subscribe to our youtube channel Opencart tutorials. Similarly, keep on visiting my personal blog https://webocreation.com where you will find lots of free modules.
In the next video, we will show you the OpenCart Framework code flow. So, don’t miss it as if you understand this flow then you can start coding without seeing other videos. So, see you in the next video and happy learning and thanks for watching and liking my videos.