CristianR Posted July 5, 2020 Share Posted July 5, 2020 I have my custom module page with controller(modules/mymodule/controllers/front/display.php, modules/mymodule/views/templates/front/display.tpl). And I wanna embed this display.tpl to product.tpl(themes/classic/templates/catalog/product.tpl) {block name='stitch_modal'} {include file=$modules_dir.'/mymodule/views/templates/front/display.tpl'} {/block} But it occurs error: Unexpected "'/mymodule/views/templates/front/display.tpl'". Anybody can help me? Link to comment Share on other sites More sharing options...
Mediacom87 Posted July 5, 2020 Share Posted July 5, 2020 Hi, Did you take the time to read all the developer documentation to build your module? https://devdocs.prestashop.com/1.7/modules/ Link to comment Share on other sites More sharing options...
Guest Posted July 5, 2020 Share Posted July 5, 2020 Here I gave an example of how to create your own hook. It can be easily adjusted as you need. You can push your tpl file as a return. return $this->setTemplate('module:mymodule/views/templates/front/display.tpl'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now