mickeyboy1 Posted July 9, 2015 Share Posted July 9, 2015 (edited) Hiya guys/gals i have added the following code so the product count doesnt show until you are at a certain level in the categories {if $category->level_depth ==6} {include file="$tpl_dir./category-count.tpl"} {/if} This works perfectly but.... I have one particular category which will only be nested to a depth of 3, an example below... test category ---test one (id =10) -----one a (id =11) -----one b (id =12) ---test two -----two a (id =13) -----two b (id =14) ---test three -----three a (id =15) -----three b (id =16) How can i add to the above code to show the product count if i am in categories one a, one b, two a, two b etc thanks in advance mb EDIT: i am using 1.6.14 default theme Edited July 10, 2015 by mickeyboy1 (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 10, 2015 Share Posted July 10, 2015 What is wrong with some condition on category number? In pseudo code: {assign var=threeers value=[11, 12, 13, 14, 15, 16]} {if $category->level_depth ==6 OR in_array($category->id, $threeers)} {include file="$tpl_dir./category-count.tpl"} {/if} I am not sure about which page you are writing, so you may need something different than $category->id. Link to comment Share on other sites More sharing options...
mickeyboy1 Posted July 10, 2015 Author Share Posted July 10, 2015 (edited) That was what i was looking for, i knew there had to be an easy solution but couldnt figure it out. thank you very much musicmaster i shall mark this as solved Edited July 10, 2015 by mickeyboy1 (see edit history) 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