Describe the bug
There's hook displayCheckoutSummaryTop at /themes/classic/templates/checkout/_partials/cart-summary.tpl template.
This hook is not in ps_hook table, so it doesn't appear in the dropdown at Design -> Positions -> Transplant a module and therefore can not be inserted.
To Reproduce
public function hookDisplayCheckoutSummaryTop()
{
return true;
}
Design -> Positions -> Transplant a moduleAvailable hooks. displayCheckoutSummaryTop is not displayed.Additional information
PrestaShop version: 1.7.6.1
Fix
Execute the following query:
`INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`)
VALUES ('displayCheckoutSummaryTop', '', NULL, '1');`
Where could this be added to be executed in the upgrading scripts?
Hi @idnovate,
I did not manage to reproduce the issue with PS1.7.6.1.
public function hookDisplayCheckoutSummaryTop()
{
return true;
}
I just added this function into a module & I reset it.

Thanks to check & feedback.
Have you used registerHook('displayCheckoutSummaryTop')?
@idnovate, yes!
Hehe this function inserts the hook when it doesn't exist :) Please just add function hookDisplayCheckoutSummaryTop() to a new or existing module and don't register it on install.
@idnovate, the module does not do much. In order to display something on the front office, we have to add support for a few hooks. This is done by implementing the hooks’ methods, and that was actually done in the install() method we wrote earlier, using the registerHook() method.
Thanks!
This is not how it works. It's inconsistent. Test the following:
public function hookDisplayCheckoutSummaryTop()
{
return true;
}
public function hookDisplayCartExtraProductActions()
{
return true;
}
Design -> Positions -> Transplant a moduleDisplayCartExtraProductActions but no DisplayCheckoutSummaryTop.The dropdown check which hooks are defined in the module and display them in the dropdown. This has been working this way always, there wasn't the need to register the hook in the install to transplant a module into a hook.
The problem is that DisplayCheckoutSummaryTop is not in ps_hook table.
@idnovate, I tried with those two functions & those two hooks are displayed.

Thanks!
Design -> Positions -> Transplant a moduledummymoduleDisplayCheckoutSummaryTop and DisplayCartExtraProductActions hooks but it doesn't. DisplayCheckoutSummaryTop is not displayed.
Please test it in a different store, as you have previously registered hook DisplayCheckoutSummaryTop so it's in your ps_hook table and you won't be able to reproduce it.
@idnovate, thanks for this clarifications.
I manage to reproduce the issue with PS1.7.6.0 & PS1.7.5.2
I’ll add this to the debug roadmap so that it’s fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
Actually the fix is this: https://github.com/PrestaShop/PrestaShop/issues/15594#issuecomment-532606917
Most helpful comment
Actually the fix is this: https://github.com/PrestaShop/PrestaShop/issues/15594#issuecomment-532606917