osCommerce Home | osCommerce eBook Store | osCommerce Tutorials

osCommerce Cart Template File Structure

In order to customize osCommerce online shop, the first idea of most shop owners like me is try to understand the file structure of osCommerce default template. Very soon, we learn that osCommerce is mainly driven by PHP and MySQL database.

osCommerce PHP MySQL

Later on, when we try to understand better the osCommerce cart file structures, we begins to get lost and surprise to find out that there are a lot of files grouped into different folders, the admin folder, the main catalog folder and the includes folder. There are also a lot of folders under the includes folder, for example, boxes, classes, functions, languages, modules, etc...

osCommerce folders and file structure

Most osCommerce shop owners like me do not have experience in developing large PHP and other programming languages projects. We usually write all codes in a single file therefore we get used to read and check codes in a single page. However for a large project like osCommerce, it may requires some programmers to develop and maintain the program. Therefore a better idea is to break the large project into several or many smaller projets. Actually this is true for all large programming projects. Then each programmer is responsible to write and maintain one or some small projects. This make the program develop faster and much easier to maintain. Whenever the program need to modify something, only the modules affected need to be modified and only the programmers responsible for such modules need to be called to work on it. This way, all codes do not need to check over again.

A similar example is the hardware structure of our computer. There are mother board, power supply, display card, sound card, memory, cpu, etc... Each manufacturer (programmer) is responsibled for a part, for example, RAM (module). When you wish to upgrade the memory, you only need to change the RAM, you don't need to buy a new computer.

Now, we have some basic idea that osCommerce shop is composed with a lot of parts (php files, classes, functions, modules, etc...).

osCommerce file structures

The reason is clear that why's there are so many files classified or grouped into different folders. You may consider the homepage of osCommerce shop act as the main program (for example, motherboard), other files (for example, sound card) will be called or picked up only when they are required by the main program.

In this osCommerce tutorial series, we try to learn the file structure of osCommerce in order to customize osCommerce shop better and easier.