Can filters display the # of products?

  • Posts: 69
  • Thank you received: 1
9 years 2 months ago #215260

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.25

Hi,

I am using static filters on a custom field... this is working fine on my products listing page...but I would like to add a quantity (of products) next to each filter value. Is there a way to do this?

For example, I have a custom field called color, and I have a filter called color with three values... blue, green, pink. If my products listing page has 10 total products on it, with 4 blue products and 6 green products, can the filters be set to display as follows:

COLOR

- Blue (4)
- Green (6)
- Pink (0)

I would like the filters to be static... ie. Dyanmic Display = NO

All is working as far as the filter functionality, but I would like to add the quantities next to each filter value as shown above.

Any ideas of where to start on this are appreciated?

Dennis


______________
Dennis Kmetz

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
9 years 2 months ago #215269

Hi,

There is no option to do that.
You'll have to modify the display function of the class hikashopRadioClass in the file administrator/components/com_hikashop/classes/filter.php
It's actually not that easy to do as you need to run custom MySQL queries to count the number of elements for each value of your filter.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum