About Prestashop, Tips & Tricks

About Prestashop, Tips & Tricks
5 (100%) 1 vote

About prestashop

PrestaShop’s technical architecture

PrestaShop is based on a 3-tier architecture, using same principle as the Model > View > Controller (MVC) architecture, only in a simpler and more accessible way:

  1. Object/data. Database access is controlled through files in the “classes” folder
  2. Data control. User-provided content is controlled by files in the root folder.
  3. Design. All of the theme’s files are in the “themes” folder

While all versions of PrestaShop up to 1.6 used only a custom architecture, starting version 1.7 Prestashop is moving to Symfony PHP framework.

The idea of migrating was to have a more robust code, more modular and fully testable.

About MVC architecture

Model

The model represents the application’s behavior: data processing, database interaction, etc.

View

The view is the interface with which the user interacts.
Its first role is to display the data that is been provided by the model. Its second role is to handle all the actions from the user (mouse click, buttons, etc.), and send these events to the controller.
The view does not do any processing; it only displays the result of the processing performed by the model, and interacts with the user.

Controller

The Controller manages synchronization events between the Model and the View, and updates both as needed. It receives all the user events and triggers the actions to perform.

How mvc work in Prestashop?

If an action needs data to be changed, the Controller will request the Model to change the data and in turn the Model will notify the View that the data has been changed, so that the View can update itself.

PrestaShop 1.7 features

Create a Product Page X2 faster and easier

A brand new way to add products in catalogue! Refreshed interface, quick actions, shortcuts, automatic management for combinations and much more

How to install PrestaShop?

Download PrestaShop

The source code of PrestaShop is hosted on the official PrestaShop GitHub Repository.
You can find here all the released versions of PrestaShop.

Choose the right version for you

Release package. A zip package, tuned for production environments

Development version.

The raw source code as it is on the GitHub repository, including build scripts and source codes for assets that are otherwise compiled (like javascript and css files).

Installing PrestaShop

Follows installation instructions here

Prestashop installation issues and errors

Compile Error: Cannot declare class AppKernel, because the name is already in use

You may find this error message the first time you open up the Back Office.
This problem may arise in case-insensitive file systems like MacOS due to a misconfiguration. Check your Apache configuration and make sure that the root directory path to your PrestaShop matches the capitalization of the actual system path exactly. A typical error is for example having a folder named /path/to/PrestaShop (capital P, capital S) and then configuring it in Apache as /path/to/Prestashop (missing the capital S).

Configuring PrestaShop

For developers

Prestashop useful links

Leave a Reply

Your email address will not be published. Required fields are marked *