How to create a Prestashop module

Creating a new prestashop modules is not difficult as it seems. To create a simple module there are 4 easy steps to follow.

Let us create an image slider for the home page

1. Add a new row for the new module in the ps_module table

name: blockslider

active: 1

2. Create the .php file

Create a folder named blockslider in the prestashop modules directory and create blockslider.php file within the directory with below code.

3. Create the .tpl file

Here you can use any JQuery based slider or create your own. Just remember to copy the relevant JS and CSS files along with any images to the modules folder and just call the JS and CSS files in the .tpl file.

Create blockslider.tpl file in the same directory as above.

4. Transplant the module

Once the module is created, it will appear in the Front Office Features section.

Make sure it is installed and enabled

Just transplant the module to Homepage content