I wish to see (number of products) in each category!

Started by SUPERMAN, September 27, 2016, 08:03:54 AM

Previous topic - Next topic

SUPERMAN

Hi,
How can i show the number of Products at the Category View!
Example!   If i have a Category for CARPETS  and there two Items, I want to see   CATEGORIES (2)   but if there are NO ITEMS than i want to show  CATEGORIES (0).
Can you help?     Thanks

abantecart

You can do this with simple edit in the template for categories.

If you use top category, edit this file:
storefront/view/default/template/blocks/category_top.tpl

In the code, everywhere you see <?php echo $category['name']; ?> change it to

<?php echo $category['name'] . "(".$category['product_count'].")"?>


Similar for <?php echo $scat['name']; ?>

SUPERMAN

Thank You!   That worked for the Drop Down Menu!
What can i change to show the (number of products) beside the Category Title which shows beneath the Category Image on the page?
Best Regards.

Forum Rules Code of conduct
AbanteCart.com 2010 -