O'Reilly logo

PrestaShop Module Development by Fabien Serny

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using back office hooks

Admin controllers are useful to create a new tab. However, if you need to alter existing tabs, you will need to use hooks in the back office. In this section, we will use only some of the hooks available. It is recommended that you read the exhaustive list of hooks at the end of the book to see all the various possibilities.

Attaching your module to a product hook

The product administration tool is composed of several sub tabs. There is a hook that permits you to add subtabs on this section: displayAdminProductsExtra.

To do so, you just have to register the hook in the constructor of your main class, (mymodcomments.php):

// Register hooks if (!$this->registerHook('displayProductTabContent') || !$this->registerHook('displayBackOfficeHeader') ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required