Does anybody know how to display the number of sub-categories?
Is it something like this; {$category_data.category_count} or {$category_data.cat_count}?
Try this addon:
[url=“http://www.codingstaff.com/products/cs-cart-addons/extended-categories-menu”]http://www.codingstaff.com/products/cs-cart-addons/extended-categories-menu[/url]
[quote name='whiplash13' timestamp='1319131477' post='124153']
Try this addon:
[url=“http://www.codingstaff.com/products/cs-cart-addons/extended-categories-menu”]http://www.codingstaff.com/products/cs-cart-addons/extended-categories-menu[/url]
[/quote]
Thanks Whiplash, but this addon shows only the products_count. I need a variable that count the sub_categories_count of a category. I'm afraid this variable cannot be requested without changing the controller pages.
Asuuming you are in the views/categories/view.tpl file… Any reason you don't just:
{assign var=sub_cat_count value=$subcategories|count}
then just use $sub_cat_count wherever you want to display the count of sub-categories for that category.
Now if you want to display the sub-category counts for the sub-categories for that categrory, then that will be more work.
[quote name='tbirnseth' timestamp='1319225981' post='124268']
Asuuming you are in the views/categories/view.tpl file… Any reason you don't just:
{assign var=sub_cat_count value=$subcategories|count}
then just use $sub_cat_count wherever you want to display the count of sub-categories for that category.
Now if you want to display the sub-category counts for the sub-categories for that categrory, then that will be more work.
[/quote]
It works! Thank you tbirnseth!