melas Posted September 26, 2013 Share Posted September 26, 2013 Hi everybody! I'm new in the prestashop community, and I would like to ask you something Is there any way to appear in every category different template? Thank You! Link to comment Share on other sites More sharing options...
vekia Posted September 26, 2013 Share Posted September 26, 2013 yes it is possible but in this case you will have to change several things: controllers, and also .tpl & css files. in CategoryController.php file located in: controllers/front/ directory you've got initContent() function with code: $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); you need to define different template file for categories, for example: if ($this->category->id==5){ $this->setTemplate(_PS_THEME_DIR_.'category-for-id-5.tpl'); // template file for caregory id: 5 } else { $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); // DEFAULT template } 6 Link to comment Share on other sites More sharing options...
melas Posted September 26, 2013 Author Share Posted September 26, 2013 Thank you for your advice, it was very helpfull !!!!!!!! I think that I undestand what I have to do! Thank you very much! Link to comment Share on other sites More sharing options...
vekia Posted September 26, 2013 Share Posted September 26, 2013 in addition to what i said above, remember, that in category.tpl you've got additional .tpl files like product-list.tpl etc. if you want to customize separate pages, you need to include these files, or other - modified files im going to mark this topic as solved best regards 1 Link to comment Share on other sites More sharing options...
melas Posted September 26, 2013 Author Share Posted September 26, 2013 Yes, SOLVED. Thank you, best regards to you too. Link to comment Share on other sites More sharing options...
Umar Akram Posted October 7, 2013 Share Posted October 7, 2013 awsOme. Link to comment Share on other sites More sharing options...
vekia Posted October 7, 2013 Share Posted October 7, 2013 awsOme. hello may i know what ps version you use? and solution above solved your issues too? Link to comment Share on other sites More sharing options...
sm5k Posted October 15, 2013 Share Posted October 15, 2013 Hi there, i got the same issu but i need to get different themes per CMS page. You can tell me if that is possible, and maybe you got an idea on how to do that? Thx a lot. Toby Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2013 Share Posted October 15, 2013 Hi there, i got the same issu but i need to get different themes per CMS page. You can tell me if that is possible, and maybe you got an idea on how to do that? Thx a lot. Toby http://www.prestashop.com/forums/topic/281955-different-themes-on-different-cms-pages/?do=findComment&comment=1418082 Link to comment Share on other sites More sharing options...
ventesites Posted September 1, 2014 Share Posted September 1, 2014 (edited) Hi Vekia Your fix woks great to get different template based on category ID but how to get templates products to use the same template as the category they belong to? Thanks Pat version 1.6.9 Edited September 1, 2014 by ventesites (see edit history) Link to comment Share on other sites More sharing options...
vadimda Posted November 29, 2014 Share Posted November 29, 2014 (edited) if i need to make different templates for different groups of categories example: categories id 5,6,7,8 use template1.tpl, categories id 9,10,11 use template2.tpl and all the rest use default.tpl Edited December 10, 2014 by vadimda (see edit history) Link to comment Share on other sites More sharing options...
vadimda Posted December 10, 2014 Share Posted December 10, 2014 found a solution after reading php docs if ($this->category->id==4 || $this->category->id==8 || $this->category->id==5){ $this->setTemplate(_PS_THEME_DIR_.'category1.tpl'); } elseif ($this->category->id==9 || $this->category->id==10 || $this->category->id==11){ $this->setTemplate(_PS_THEME_DIR_.'category2.tpl'); } else { $this->setTemplate(_PS_THEME_DIR_.'category.tpl'); } 1 Link to comment Share on other sites More sharing options...
afshop Posted December 18, 2014 Share Posted December 18, 2014 in addition to what i said above, remember, that in category.tpl you've got additional .tpl files like product-list.tpl etc. if you want to customize separate pages, you need to include these files, or other - modified files im going to mark this topic as solved best regards Hi vekia is it possible to setup for the price drop different pages for each category? I would to show the promotions articles in different pages for man, woman and not in only one page. thanks Angela Link to comment Share on other sites More sharing options...
jasonbsmith Posted June 29, 2016 Share Posted June 29, 2016 Is there a module that can be purchase that does this? 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