Developer forum

Forum » CMS - Standard features » New Index Facet Options Sort values

New Index Facet Options Sort values

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I am trying to play weith the new index and use the Fiel list type of facet.

I could not figure out how the Options are sorted.

In GetLoop("FacetOptions") I see there is a tag called "FacetOption.Sort" but it always return 0.

I was wondering if this is a version related issue or if I am doing something wrong.

I am using 8.8.0.6.

Thank you,
Adrian

 


Replies

 
Nicolai Pedersen
Reply

Hi Adrian

Sort only has a value for Variant options and for list options from custom product fields of type list.

In later versions sorting has been changed to sort by name of the label. It uses a custom alpanumeric comparer to sort options as good as possible. something like this:

  1. 2XL
  2. 20
  3. 200 Small
  4. Alpha
  5. Some
  6. Zebra

 

You must be logged in to post in the forum