Hi,
I can't get to it...
I want to Hook blockcart to the hook 'SHOPPINGBAG'.. In frontcontroller this is my code:
public function initContent()
{
$this->process();
if (!isset($this->context->cart))
$this->context->cart = new Cart();
if (!$this->useMobileTheme())
{
// These hooks aren't used for the mobile theme.
// Needed hooks are called in the tpl files.
$this->context->smarty->assign(array(
'HOOK_HEADER' => Hook::exec('displayHeader'),
'HOOK_TOP' => Hook::exec('displayTop'),
'HOOK_SHOPPINGBAG' => Hook::exec('displayShoppingBag'),
'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),
'HOOK_RIGHT_COLUMN' => ($this->display_column_right ? Hook::exec('displayRightColumn', array('cart' => $this->context->cart)) : ''),
));
}
else
$this->context->smarty->assign('HOOK_MOBILE_HEADER', Hook::exec('displayMobileHeader'));
}
I also have added the rule to the second bunch of lines in frontcontroller.php in the exact same way.
In blockcart.php I have tried so many things but in the end I came up with the code given in this tutorial:
public function hookShoppingBag($params) {
return $this->hookheader($params, 'displayShoppingBag');
}
Maybe I've done something wrong in the code above.
I want to place the hook in header.tpl this is the code I've used:
<div class="shoppingbag">
{$HOOK_SHOPPINGBAG}
</div>
I also have tried {hook h="displayShoppingBag"}.
Since I'm new to prestashop I might have made a stupid mistake.. But I'm stuck on this thing for a couple of hours, I really appreciate any kind of help. Thanks!