Assign Hook in Tpl File | Create Custom Hook
Make a Hook | Add exec Hook in Controller
$this->context->smarty->assign( 'HOOK_LEFT_COLUMN', Hook::exec('displayLeftColumn') );
$this->context->smarty->assign( 'HOOK_LEFT_COLUMN', Hook::exec('displayLeftColumn') );
{hook h='displayLeftColumn'}
{hook h='displayLeftColumn' mod='blockcart'}
$hook = new Hook();
$hook->name = 'displayAtSpecificPlace';
$hook->title = 'The name of your hook',
$hook->description = 'This is a custom hook!';
$hook->add(); // return true on success
…but PrestaShop enables you to do it the easy way:
$this->registerHook('displayAtSpecificPlace');
If the hook “displayAtSpecificPlace” doesn’t exist, PrestaShop will create it for you.
Comments
Post a Comment