Doubt about custom hooks in PrestaShop

Hello Milos,
I have installed and created hooks in your free module Hooks Manager. I have added the following lines to my template:
{hook::exec('MadIndexMiddle')}
{hook::exec('MadIndexBottom')}
etc.
Here is my question:
The hook position does not appear in the list of hooks in the "positions" page even when you want to transplant a module in a hook on the transplant page.
My PS version 1.6.1.17.
Do I do something wrong ?

hooks manager prestashop


hello
The hook position does not appear in the list of hooks in the "positions" page
"positions" section displays hooks that are associated with at least one module. As long as hook will be empty (without any module attached to it) prestashop will not show it under "positions" section.

even when you want to transplant a module in a hook on the transplant page.
On "transplant" page displays one dropdown with module selection and second dropdown with hook selection.
List of hooks in second dropdown depends on the module. If module selected in first dropdown does not have a support of your new hook, second dropdown willl not have your new hook on the list.

this means that main module .php file you want to transplant to new hook must have funtion:

public function hookMadIndexMiddle($params) { // code of function to support new hook MadIndexMiddle } public function hookMadIndexBottom($params) { // code of function to support new hook MadIndexBottom }
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment