I have created a Prestashop module to display categories in a nice slider. However, the problem is that even though I have assigned my module to the hookDisplayHeader, it seems to ignore that hook and it gets rendered right after the body tag of the page, which is kind of weird since I do not see how is it possible for it to render there in the template.
Here's my install method:
public function install() {
if (Shop::isFeatureActive()) {
Shop::setContext(Shop::CONTEXT_ALL);
}
if (!parent::install() ||
!$this->registerHook('leftColumn') ||
!$this->registerHook('displayHeader') ||
!Configuration::updateValue('RBCATEGORIES', 'my friend')
) {
return FALSE;
}
return TRUE;
}
And here's how I'm pushing the file to the took:
$this->context->smarty->assign(array(
'categories' => $processed,
));
return $this->display(__FILE__, 'rbcategories.tpl');
In the end, my block gets rendered above the page:
In the positions settings, my module is correctly displayed in the Header section:
