Jump to content

Edit History

squivo

squivo


the hook name was typed wrong: 'displayCustomHook' is the proper name

Is dispatching the hook different than registering it? I can see my hook in the database table, and it's printing... so where would add the dispatch code? 

$this->hookDispatcher->dispatch();

This is my install code:

public function install()
{

  if (Shop::isFeatureActive())
    Shop::setContext(Shop::CONTEXT_ALL);

    if (!parent::install() || !$this->registerHook('displayCustomHook') || !$this->addTab() || !$this->addMyCustomTables()  )
        return false;

    return true;
}

 

squivo

squivo

Is dispatching the hook different than registering it? I can see my hook in the database table, and it's printing... so where would add the dispatch code? 

$this->hookDispatcher->dispatch();

This is my install code:

public function install()
{

  if (Shop::isFeatureActive())
    Shop::setContext(Shop::CONTEXT_ALL);

    if (!parent::install() || !$this->registerHook('customHook') || !$this->addTab() || !$this->addMyCustomTables()  )
        return false;

    return true;
}

 

×
×
  • Create New...