Sample modules and how to guides

The PrestaShop Community has made example modules and how-to guides to help you understand how to implement hooks, admin grids, manage entities… and a lot more.

Example modules

This repository hosts example modules built and maintained by PrestaShop. These modules demonstrate usecases useful for developers willing to customize the software.

Most of these modules have been optimized and made compatible for PrestaShop v9.0.0 and above. If you want to see examples for lower versions of PrestaShop you should check the 8.x branch of this repository.

Modules list

Module name Description Minimum version
api_module This example module demonstrates how to modify PrestaShop’s new API. v9.0.0
demo_grid This module demonstrates how to use Grid in PrestaShop 1.7.7+ v1.7.7
democonsolecommand Example module showing how to implement a Symfony console command v9.0.0
democontrollertabs Demo Creating modern Controllers and associate Tabs to them v9.0.0
demodoctrine This module demonstrates how to use Doctrine entities in PrestaShop 9.0.0 and above v9.0.0
demoextendgrid This module demonstrates how to insert an additional row action to existing grid and how to register javascript in admin controller v1.7.7
demoextendsymfonyform1 Learn using identifiable object and grid hooks. v9.0.0
demoextendsymfonyform2 This module demonstrates how to insert an “upload image” input field inside the Symfony form managing “Edit a Supplier” page and how to use DoctrineORM to manage the database state of a custom object v9.0.0
demoextendsymfonyform3 This example demonstrates the usage of CQRS pattern and hooks v9.0.0
demoextendtemplates This is example module explaining various extendability options of templates v9.0.0
demofiltermodules In this example module, we demonstrate how to filter the list of modules executed for a given hook based on the module’s name. v8.2.1
demoformdataproviders This module illustrates FormDataProviderData and FormDataProviderDefaultData hooks v8.0.0
demojsrouting This module illustrates how to use Javascript Router component in a module v9.0.0
demomoduleroutes This module illustrates using the moduleRoutes hook in a module. v8.0.0
demomultistoreform This module demonstrates how to make your forms multistore compatible in your module, in a CRUD context. v1.7.8
demooldproductpagehooks This module illustrates the hooks on the old product page. v1.7.8
demooverrideobjectmodel Example module showing how to override an ObjectModel (in this case the manufacturer) and add a custom field in the database table. v9.0.0
demoproductextracontent Example module to add extra content to the product page on the front office v1.7.0
demoproductform This is an example module explaining various extendability options in product page form v9.0.0
demosymfonyform This module demonstrates how to use existing PrestaShop Symfony form types inside a new page. v9.0.0
demosymfonyformsimple In this module, you will learn how to utilize Symfony form types to create configuration pages for your module. This module has been created by following a guide from the developer documentation. v9.0.0
demovieworderhooks This module was created in order to demonstrate how to use the new hooks introduced with the new “View an Order” back office page in PrestaShop v9.0.0. v9.0.0
demowsextend This module adds a resource managed by ObjectModel to the WebService. v1.7.8
example_module_mailtheme Example module to add a Mail theme to PrestaShop. v9.0.0