You are here:  » displaying number of products in filter link

Support Forum



displaying number of products in filter link

Submitted by don_load on Fri, 2010-07-16 17:37 in

hi,

I've got the filters mod applied which displays a sidebar of links for category, merchant and brand. Is there a way of showing the number of products for the link depending on what filters have been applied.

For example, if a user had selected merchant filter 'tesco' and there were brands available through tesco they would display the number of products. If certain brands aren't available then it would display (0). Basically a dynamic product count for each link.

thanks
J

Submitted by support on Sun, 2010-07-18 08:26

Hi J,

This sort of thing has to be taken very carefully so as not to cause any performance issues - basically it will involve a COUNT with WHERE clause for every filter option that is available; which will all add up timewise.

I can certainly have a go at it for you - it should be OK on a niche site with a smallish database size but I would really advise against it for a generic shopping installation. If you'd like to give it a go if you could email me your html/searchresults.php I'll take a look for you...

Cheers,
David.