prestatent Posted November 27, 2013 Share Posted November 27, 2013 (edited) Prestashop 1.5.4.1 Hello Is there a way to show only categories and sub-categories on the category.tpl and then when a category or sub-category is selected/clicked on, all the products for that category are shown. The reason I ask is that if I click on a top-level category, all the products under the top-level category are shown (which I don't want), rather than a list of categories to choose from. Is there an easy way to amend the template file, or is there some configuration in back-office that I could tweak to show what I want. I'm sure this question must have been asked before, so hopefully someone knows the answer. Thanks. Edited November 27, 2013 by prestatent (see edit history) Link to comment Share on other sites More sharing options...
stottycabanas Posted November 27, 2013 Share Posted November 27, 2013 Hi prestatent, In the file ../themes/yourtheme/category.tpl look for {if $products} After that line, insert {if !isset($subcategories)} Add a closing {/if} just before the existing one. Thanks, Dave 3 Link to comment Share on other sites More sharing options...
prestatent Posted November 27, 2013 Author Share Posted November 27, 2013 Thanks for the quick reply Dave. I implemented this code and it does the job. Thank you very much for this. Appreciate your time. Link to comment Share on other sites More sharing options...
stottycabanas Posted November 27, 2013 Share Posted November 27, 2013 No worries, glad it worked for you. Link to comment Share on other sites More sharing options...
tony_mik Posted September 24, 2015 Share Posted September 24, 2015 Hi prestatent, In the file ../themes/yourtheme/category.tpl look for {if $products} After that line, insert {if !isset($subcategories)} Add a closing {/if} just before the existing one. Thanks, Dave Thank you! That worked for me to (Prestashop 1.6.1.1). 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