Developer forum

Forum » Ecommerce - Standard features » Multiselect facet option

Multiselect facet option

Thaw Htun Lynn
Reply

Hi,

I've created some facet options in repository and it is working fine if we select only one item in the fornt end but it is not working if we select multiple items in the facet option.

I am using Field in Field type and didn't check 'Analyzed' option because my field values can have spaces. For example, I've created a field called Country which has values 'AU', 'AT', 'NZ' ,etc. It is working if I select Default.aspx?ID=36&country=AU but not working if multiple options are selected Default.aspx?ID=36&country=AU,AT. Kindly guide me how I can make this work.

Regards,

Thaw

 

 

best regards,

Thaw


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Thaw

If you on your right side have a CSV list of chosen facets, i.e. &color=red,black,yellow, you should see it as an array. So when you define your parameter, the type should of type syste.string[].

In your query, your left side is the field you want to search, and your right side will be the parameter array of type system.string[]. Then you can choose a comparer - "Contains all" or "Contains any" - Contains all means you only want products that are both red AND black AND yellow (requires that your left side is also an array), if you choose Contains any, it means you want products that are either red OR black OR yellow.

Hope this clarifies.

BR Nicolai

Capture.PNG
Votes for this answer: 1
 
Thaw Htun Lynn
Reply

Thank you Nicolai, I didn't notice there is array data type in the selection before. Now it is all working.

Best Regards,

Thaw

 
Kim Søjborg Pedersen
Reply

Cool, thanks for sharing this

 

You must be logged in to post in the forum