Call Module in tpl file in prestashop
html, php, prestashop, smarty
Solution
You cannot include a module template like this because the PHP code of te module is not called and the template needs it to set some Smarty variables.
The best you can do is to hook the blocksearch module to your header. Here we go :
- Navigate to "admin > modules > positions"
- Click on "Transplant a module" button
- Select "Quick Search Block" for "Module"
- Select ""Header of pages / displayHeader" for "Hook into"
- Click "Save"
The "Quick Search module" is now hooked to your header.
Problem
I want to use search module in my `header.tpl` file . In that i used this code `{include file='./modules/blocksearch/blocksearch.tpl'}` But it's not working and by using this code my page gets blank. Thanks in advance