LumberShad Posted May 24, 2019 Share Posted May 24, 2019 Hello ! I'm a new developper on PrestaShop and I'm in internship for a company to make his parfumer e-commerce website. My boss want to add custom design for each categories, I search a lot, see in the code how work the differents controllers but nothing work, see were is located the .tpl file to design but don't know how to detect categories and set the good template for each. Please, can you help me ? I work on PrestaShop 1.7.5.2. Hope you can help me :3 Link to comment Share on other sites More sharing options...
Daresh Posted May 24, 2019 Share Posted May 24, 2019 https://devdocs.prestashop.com/1.7/themes/reference/templates/templates-layouts/ Link to comment Share on other sites More sharing options...
tdsoft Posted May 24, 2019 Share Posted May 24, 2019 You can open file: themes\classic\templates\catalog\listing\category.tpl Write a statement check category_id and load layout {if {$smarty.request.id_category == 1} //load tpl file for category id = 1 else if {$smarty.request.id_category == 2} .. {/if} Read more If in Smarty: https://www.smarty.net/docsv2/en/language.function.if.tpl Link to comment Share on other sites More sharing options...
LumberShad Posted May 24, 2019 Author Share Posted May 24, 2019 Thanks you ! 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