Hey,
I have a shop where i have a few productcategory fields of type "List".
My category is used across multiple product groups, so my productcategory fields contain all posible options.
See images here: http://test.co3.dk/martin/dw/PCF_admin.png and http://test.co3.dk/martin/dw/PCF_admin_options.png
So what i need to do in frontend is to limit the list of visible filtering options, to only show the options that have products.
In eCom there's a checkbox for it on the product list. but when i select it it doesn't seem to do anything:
Setting in eCom: http://test.co3.dk/martin/dw/PCF_admin_ecom.png
My view in frontend: http://test.co3.dk/martin/dw/PCF_frontend.png
After checking the checkbox in eCom i would assume that options like "Barcode Econyl Modular(0)" would disappear, but they are still rendered.
Did i misunderstand what the checkbox does, or do i need to do more that what i described above?
I've testet the above approach on other sites, and it doesn't work there either.
Best regards
Martin
Developer forum
E-mail notifications
Limit filteroptions based on products in group.
Martin Nielsen
Posted on 22/09/2011 10:01:50
Replies
Martin Nielsen
Posted on 26/09/2011 11:25:30
Am i the first person to use this checkbox? (http://test.co3.dk/martin/dw/PCF_admin_ecom.png)
// Martin
// Martin
Pavel Volgarev
Posted on 19/10/2011 09:16:14
Hi Martin,
Seems like a bug - I will ask out QA engineers to investigate on that.
As a workaround you can wrap each row in your checkbox list into "If Defined(...)" and pass the tag that returns the total amount of products for the given category field (either "Ecom:Filters.ProductFields.Row.Total" or "Ecom:Search.Filter.Option.ResultsCount" depending on what approach (template-wise) you've chosen). In this case options with zero products will not be rendered.
-- Pavel
Seems like a bug - I will ask out QA engineers to investigate on that.
As a workaround you can wrap each row in your checkbox list into "If Defined(...)" and pass the tag that returns the total amount of products for the given category field (either "Ecom:Filters.ProductFields.Row.Total" or "Ecom:Search.Filter.Option.ResultsCount" depending on what approach (template-wise) you've chosen). In this case options with zero products will not be rendered.
-- Pavel
Martin Nielsen
Posted on 19/10/2011 09:54:27
Hi Pavel,
Thank you for your reply.
Doing it template-vise adds a new problem, since i only want to remove options with 0, when i haven't applied any filtering.
When i start applying filters i only don't want options that initally had more that 0 to be removed.
I think that's the most common way to use filters.
Regards
Martin
Thank you for your reply.
Doing it template-vise adds a new problem, since i only want to remove options with 0, when i haven't applied any filtering.
When i start applying filters i only don't want options that initally had more that 0 to be removed.
I think that's the most common way to use filters.
Regards
Martin
You must be logged in to post in the forum