Bonjour,
J'essaie d'écrire mon hook perso mais rencontre un gros problème.
Dans ma page module-configure.html
{hook name="subscription.logbook-main"}
Dans le fichier Subscription.php
public function getHooks()
{
return array(
// Manage i18n
array(
"type" => TemplateDefinition::BACK_OFFICE,
"code" => "subscription.logbook-main",
"title" => array(
"fr_FR" => "Hook Journal des paiements",
"en_US" => "Logbook Hook",
),
"description" => array(
"fr_FR" => "Mon hook qui affiche le journal des paiements",
"en_US" => "My hook which prints the logbook",
),
"active" => true
)
);
}
Dans config.xml:
<hook id="subscription.logbook.hook" scope="request">
<tag name="hook.event_listener" event="subscription.logbook-main" type="back" templates="render:main_logbook.html" />
</hook>
Mais malheureusement j'ai une erreur:
InvalidArgumentException in RegisterHookListenersPass.php line 69:
Hook subscription.logbook-main is unknown.
Pouvez-vous m'aider SVP? Ai-je oublié quelque chose?
Last edited by wisejack (21-04-2017 21:57:36)