X-Cart file structure
page last edited on 27 November 2017
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.
Table of Contents
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/FormFieldfolder contains view classes that render different types of input fields;
<X-Cart>/classes/XLite/View/Modeldirectories 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/ItemsListfolder contains view classes that define various item lists in customer and admin areas;
<X-Cart>/classes/XLite/Coredirectory contains classes that define core entity of the store, e.g. database, http request wrappers, translation drivers etc.
<X-Cart>/classes/XLite/Logicfolder contains classes that define complex routines, e.g. import, export, tax calculation, image resizing, etc.
<X-Cart>/classes/XLite/Modeldirectory contains model classes. Every entity in the store is represented by a model class: product, category, order, user, etc.
<X-Cart>/classes/XLite/Modulefolder 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.
Помогите улучшить эту статью
Исходный код этой и других страниц документации открыт и доступен на GitHub.