- Posts: 69
- Thank you received: 1
Can filters display the # of products?
- dkmetz@taylorbruce.com
-
Topic Author
- Offline
Less
More
11 years 1 week ago #215260
by dkmetz@taylorbruce.com
______________
Dennis Kmetz
Can filters display the # of products? was created by dkmetz@taylorbruce.com
-- 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
-- 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.
11 years 1 week ago #215269
by nicolas
Replied by nicolas on topic Can filters display the # of products?
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.
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.199 seconds