I've very new to Prestashop (familiar with Joomla, Virtuemart, Magento etc, jQuery HTML CSS)...
I'm trying to create a custom hook and transplant an existing module (homeslider) into it. So far, I've managed to create the hook, and display the homeslider module. But the banner is not being displayed correctly (banner images are below one another) - it seems that the js and css files are not being called correctly. I've bashed away at this thing for a couple of days now - re-purposed some functions like hookdisplayHeader, hookdisplayTopColumn - but I'm still getting the same result.
This is what I've done so far:
Registered the Hook:
$this->registerHook('MondayTest')
Called the hook:
public function hookMondayTest($params)
{
if (!isset($this->context->controller->php_self) || $this->context->controller->php_self != 'index')
return;
if (!$this->_prepareHook())
return false;
return $this->display(__FILE__, 'homeslider.tpl');
return "MondayTest5";
}
Called the hook in footer.tpl (for testing purposes):
{hook h="MondayTest"}
But it's not working correctly... What am I doing wrong?
Please help! Your assistance is greatly appreciated in advance!
The safest way to 'move' a module from one hook to another custom hook is to use the call the original hook handler method
Example:
If you want to change the bahviour of the module on the custom hook, you will need to copy all the code from the original method and modify on it accordingly