Child pages
  • Front Office Hooks
Skip to end of metadata
Go to start of metadata

This section of the documentation is only about front office hooks: display and action.

All Hooks

The full list is regularly published on the Build devblog. Here is the latest.

Creating a custom hook

Creating a dynamic hook

When your module or theme calls a hook, PrestaShop executes it.

From a regular PHP file:

Hook::exec('MyCustomHook');

From a Smarty template:

{hook h='MyCustomHook'} 

Making your hook visible and reusable

If you want the user to be able to see your hook in PrestaShop’s Position page (in the back office), it has to be registered.

You can register your hook from your theme’s theme.yml file:

global_settings:
  hooks:
    custom_hooks:
      - name: displayFooterBefore
        title: displayFooterBefore
        description: Add a widget area above the footer

You can also register your hook from a module.

  • No labels