Skip to content

Latest commit

 

History

History

develop-a-module

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Example: develop a module

This example demonstrates how a local module can be mounted in your PrestaShop Flashlight instance for development purposes.

Bind a local module to your instance in your manifest

Install the module's dependencies:

cd ./modules/testmodule
composer install

Run flashlight with a RW bind mount (see ./docker-compose.yml)

docker compose up prestashop --force-recreate

And that's it: your module is available on the prestashop Docker container, and changes made in the local directory of the module are automatically synchronized on the prestashop Docker container.

Install / test the module

You can access to PrestaShop in your browser:

You can go to modules > install and install your module, or install it with cli:

  1. obtain container name:
docker ps
  1. execute the installation module command in the container:
docker exec -ti container_name php /var/www/html/bin/console prestashop:module install testmodule