Jump to content

Main categories product counter


Recommended Posts

I want that every category in the category block will have an item counter; the item counter is the sum of all the products from all the subcategories.

Like:

Laptops ( 25 models )
   |
   toshiba
   |    |
   |   2009 models ( 15 models )
   dell
        |
        2010 models ( 10 models ) 


How can I do this ? Thanks.

Link to comment
Share on other sites

i added it and i get this error :

Notice: Undefined index: product_count in /var/www/vhosts/httpdocs/modules/blockcategories/blockcategories.php on line 83



also the categories are missing. what's the problem ?

Link to comment
Share on other sites

I'm guessing you are using the free module that I didn't write rather than my paid module, since my module is called blockcategoriesnc. I'm not familiar with that free module, but I do now that notices are not errors and can be safely ignored, though it is good to fix them. It appears that the module is using a variable before declaring it. You can modify the module and add $product_count = 0; before line 83 of modules/blockcategories/blockcategories.php to make sure that the variable is initialised with a value.

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...