This is a basic module skeleton for Prestashop; it is a collection of boilerplate code that should make easier to develop a modern PrestaShop module. It uses Symfony services and some custom classes developed in order to speed-up common tasks (such as creating SQL queries for object-model tables creation )
It includes folders, empty index.php
s and many utility classes.
It also includes a composer.phar
to install the required dependencies.
It also comes with some boilerplate code useful to create symfony controllers in your application.
Test folder for this project contains tests for general skeleton functionalities. Test folder inside the moduleskeleton folder is for tests of the specific final module we provide the skeleton for.
The moduleskeleton
folder contains the actual code. This folder is to be renamed according to your module specifications.
The same is true for moduleskeleton.php
and the ModuleSkeleton
class it contains.
For more information on PrestaShop folder structure, see the official documentation
The examples
folder contains some practical file examples mostly inspired from real projects, to be used as bases to copy when creating a new
module.
Here are some of the reasoning behind choices made for this project. I feel that sometimes PrestaShop native classes and common patterns lead to a worse overall develompent experience. My choices are obviously opinionated, but I tried to document them when possible, and I am always open to reconsider them.
Why not directly use PrestaShop native Configuration
class, and instead create a wrapper on top of it?
- add examples
- add unit tests