Introduction
This article describes the general structure of X-Cart files. We will walk through main folders of X-Cart and explain what classes are there.
X-Cart structure
Main codebase of X-Cart 5 is located in <X-Cart>/classes/XLite
directory. This code represents all business logic of the software.
<X-Cart>/classes/XLite/Controller/
directory contains X-Cart controllers. The purpose of controller class is to process request, prepare data received and dispatch the request to proper viewer class if needed.<X-Cart>/classes/XLite/View/
directory contains X-Cart view classes. View classes are responsible for displaying various parts of the store. There are many sub-folders in this directory, but there are some that are widely used in different parts of the software.<X-Cart>/classes/XLite/View/FormField
folder contains view classes that render different types of input fields;<X-Cart>/classes/XLite/View/FormModel
and<X-Cart>/classes/XLite/View/Model
directories contain view classes that define how form of entity creation will look like (e.g. product, category, news list, etc)<X-Cart>/classes/XLite/View/ItemsList
folder contains view classes that define various item lists in customer and admin areas;
<X-Cart>/classes/XLite/Core
directory contains classes that define core entity of the store, e.g. database, http request wrappers, translation drivers etc.<X-Cart>/classes/XLite/Logic
folder contains classes that define complex routines, e.g. import, export, tax calculation, image resizing, etc.<X-Cart>/classes/XLite/Model
directory contains model classes. Every entity in the store is represented by a model class: product, category, order, user, etc.<X-Cart>/classes/XLite/Module
folder contains all modules' classes. It contains modules of default X-Cart package (developer IDs XC and CDev), paid X-Cart modules (developer ID QSL) and from 3rd party vendors.