Book Image

PrestaShop Module Development

By : Fabien Serny
Book Image

PrestaShop Module Development

By: Fabien Serny

Overview of this book

Table of Contents (19 chapters)
PrestaShop Module Development
About the Author
About the Reviewers

Changing the position of your module on a hook

You have to know that a module attached to a hook has a position. The positions represent the order in which the modules are called. When you attach a module to a hook, the module will be automatically set in the last position. However, you will be able, for most of the hooks, to change the order of the modules in PrestaShop's back office (by navigating to Main menu | Modules | Positions).

In our case, if you didn't install any other module than mymodcomments since you installed your shop, you should have only one other module attached to the hook: displayProductTabContent that results in Product Comments (which is a module similar to the one we are creating):

As you can see, the position number and arrows are displayed for each module attached to this hook. You can change the position either by clicking on the position of My Module of product comments, and without releasing your click, drag it up just above the Product Comments module, or by...