Skip to content


Repository files navigation

Module bedrock for PrestaShop

PHP tests GitHub release GitHub license


Tired of building module from scratch every time?
Not satisfied with the PrestaShop generator?
Want an up-to-date bedrock to start with?

Consider cloning this repository and start from kjmodulebedrock!

You can use it freely to develop and sell your own modules.

Essential features



Get started

git clone

# Then create your own module from it
cp -R kjmodulebedrock yourmodule
cd yourmodule
rm -rf .git
git init
composer install
cd _dev
npm install

Recommended: Automate the process

Here is a bash script to create a new module from kjmodulebedrock.
It uses fop:module:rename command from fop_console project to automate the "search/replace occurences" process. It will also link the local repository to your GitHub remote one if it exists.

It's highly recommended to create an alias for the create-new-module script in order to use it in all your PrestaShop projects. The instructions are available in this gist. Replace <your-command> by /path/to/ and your-alias with whatever you want.
Make sure you are at the root of your PrestaShop environment and run the script like this:

your-alias PREFIX,ModuleClassName

# Example
ps-new-module KJ,MyModule


  • tests/php/.phpstan_bootstrap_config.php
    For GrumPHP: Set PrestaShop installation path for PHPStan task.
    Replace default path with the root path of a stable PrestaShop environment.


Here are some useful commands you could need during your development workflow:

  • composer grum
    Run GrumPHP tasks suite.
  • composer header-stamp
    Add license headers to files.
  • composer autoindex
    Add index files in directories.
  • composer dumpautoload -a
    Update the autoloader when you add new classes in a classmap package (src and tests folder here).
  • npm run watch
    (in _dev folder) Watch for changes in _dev folder and build automatically the assets in views/dist folder. It's recommended to run it in background, in a dedicated terminal.


PrestaShop >=
PHP >=7.1 for production and >=7.3 for development
Multishop ✔️


Academic Free License 3.0.

Reporting issues

You can report issues in this very repository.


As it is an open source project, everyone is welcome and even encouraged to contribute with their own improvements!

To contribute in the best way possible, you want to follow the PrestaShop contribution guidelines.


Feel free to contact us by email at