Asked 3 years ago
12 Jul 2021
Views 462
Ozella

Ozella posted

Hook in CMS page in Prestashop

How to put hook in CMS page in Prestashop
i want to display product so i want to put related product hook at CMS pages
noob

noob
answered Jul 12 '21 00:00

For Prestashop version 1.6.x

1 . find the cms tpl file
From root directory
themes/your template name/cms.tpl

2. find the code where you want to put the hook

     {$cms->content}  

suppose we want to put the hook after the content display

3. run the hook

  {hook h='displayFooterProduct' product=$product category=$category} 


here i pass on the product and category which you need to pass find related product

or if you are using any other hook which don't require the parameter then use like this

  {hook h='displayFooterProduct' } 


Thats it ! Done !
Post Answer