Jump to content

[SOLVED]Showing product count


mickeyboy1

Recommended Posts

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 by mickeyboy1 (see edit history)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...