How to use custom hooks in PrestaShop 1.7

Опубликовано: 12 Октябрь 2024
на канале: BelVG eCommerсe Development Company
10,342
34

A step-by-step tutorial on using custom hooks in PrestaShop 1.7. We used adding a full-width slider as an example, but you can use custom hooks for a broad variety of other purposes.

Here are the lines to be inserted into the mentioned files:

For theme.yml:

displaySlider:
ps_imageslider

For layout-both-columns.tpl:

{if $page.page_name == 'index'}
{hook h='displaySlider'}
{/if}