I've created a module in PrestaShop and registered it to a custom Hook:
public function install()
{
if (Shop::isFeatureActive())
Shop::setContext(Shop::CONTEXT_ALL);
return parent::install() &&
$this->registerHook('homeProducts') &&
$this->registerHook('header') &&
Configuration::updateValue('MYMODULE_NAME', 'my friend');
}
[...]
public function hookDisplayHomeProducts($params)
{
$this->context->smarty->assign(
array(
'my_module_name' => Configuration::get('MYMODULE_NAME'),
'my_module_link' => $this->context->link->getModuleLink('mymodule', 'display')
)
);
return $this->display(__FILE__, 'mymodule.tpl');
}
This module works fine with a native hook (for example displayLeftColumn
) but when I create a custom one (like "homeProducts
") then I am unable to transplant my module to that hook, because it's not visible on the list of hooks.
How can I make this custom hook appear in the list of available hooks?