ilya bogackiy
ilya bogackiy

Reputation: 51

Prestashop template hook call

I want to call a hook from template like this:

{hook h='displayCustom' mod='customcontent'}

I created a new hook and added method to module like this:

  $this->registerHook('displayCustom');

  public function hookDisplayCustom($params) {

      return $this->display(__FILE__, 'customcontent.tpl');

  } 

I see that module triggered but there is no output. How can i fix it? Prestashop 1.6, customcontent.tpl contents simple text 'TEST'.

Upvotes: 0

Views: 1126

Answers (1)

ilya bogackiy
ilya bogackiy

Reputation: 51

If smbdy will get in trouble with this. Possible solution is: There is a trigger in admin panel that turns off all other modules except native. The path is: Admin panel -> Configuration -> Performance -> Turn off all non-native modules. It has to be off.

Upvotes: 1

Related Questions