Developer forum

Forum » Ecommerce - Standard features » DW10 - Select all facet option

DW10 - Select all facet option

Alexander Tømmerholen
Reply

Hi,

So, I`m pretty sure what I`m about to ask is not possible but have to ask anyway.

We have gotten a request from a customer that they want an "Select all" option under each facet. We are currently using normal field facet so all the different values becomes an option. I can see why the customer want this since their customer might not now what range inside of "Strøm AC" they want, but want a product inside of "Strøm AC". Could of course just create a new field that control if the products fall under "Strøm AC" or "Strøm DC", but we already have a lot of facet so don`t really want to create many more. Anyone got an idea on how this could be solved? 


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Alexander,

I may be reading it wrong, but if they won't select anything in the Strom AC facet, it would be just as if they selected everything. Assuming that all products in the list have a value for Strom AC.
If that's not the case, maybe having a facet for "Type" with the options "Strom AC" and "Strom DC" would allow them to select all products from that category.
Of course, you can probably add a JavaScript function that checks all checkboxes in a list, but that would generate a very long list of selected facets, and the user would not be able to remove specific values from it (if you display them separately).
 

Adrian

 
Alexander Tømmerholen
Reply

Hi Adrain,

Unfortunately does not all products in the list have a value for "Strøm AC".

Having a "Type" facet would solved it around "Strøm" but going that way we would need to create a lot more facets since their is so many instances where we would need to create a "Type" facet. On the productlist my screenshot is from we would need to create 5 new, and the list already have 14 facets just on that group. I feel that amount of facet would only confuse the user and not be to any help. 

Most likely have to do something with JavaScript and be a bit creative. Only thing then is when the user click on "load more products". Since this list contains of 425 products i don`t want to load every product just to have a "Select all" option. Could maybe to some htmx magic but not sure. 

I`m afraid we need to restructure the data to come any way close to what the user want. 

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Alexander,
Restructuring the data makes more sense.
Adrian

 

You must be logged in to post in the forum