Jump to content

Hook et fonction install


Recommended Posts

Hello to everyone,

 

I started in prestashop and tries to put a hook in place in version 1.5

 

So I in my header.tpl

{hook h="MonHook"}

 

In the module categories.php

 

function hookMonHook($params)

{

return $this->hookLeftColumn($params);

}

 

and I have also put the code for the automatic creation of the database in my hook

($this->registerHook('MonHook'))

 

But where exactly in the code below?????

public function install()
{
 if (!parent::install() ||
  !$this->registerHook('leftColumn') ||
  !$this->registerHook('footer') ||
  !$this->registerHook('header') ||
  // Temporary hooks. Do NOT hook any module on it. Some CRUD hook will replace them as soon as possible.
  !$this->registerHook('categoryAddition') ||
  !$this->registerHook('categoryUpdate') ||
  !$this->registerHook('categoryDeletion') ||
  !$this->registerHook('actionAdminMetaControllerUpdate_optionsBefore') ||
  !$this->registerHook('actionAdminLanguagesControllerStatusBefore') ||
  !Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 4) ||
  !Configuration::updateValue('BLOCK_CATEG_DHTML', 1))
  return false;
 return true;
}

 

After we have grafted module position?

 

Thank you for your help.

Edited by nini13 (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...