Developer forum

Forum » Ecommerce - Standard features » FacetOption.Sort

FacetOption.Sort

Kim Søjborg Pedersen
Reply

Hi, does this explanation still apply (9.3.1) or something new has happened in the area? http://doc.dynamicweb.com/forum/cms-standard-features/new-index-facet-options-sort-values?PID=1605 

I use thet query "Variant options in stock" and the challenge is that it has values like 48,49,50, S,M,L,XL, 2XL and using a alpanumeric comparer gives a result like this:

2XL
48
49
50
L
M
S
XL
XXL

Or is there a clever workaround :)

Regards
Kim

 


Replies

 
Nicolai Pedersen
Reply

Yes it does. You can add the options manually to the facets file instead and control how they are sorted.

 
Kim Søjborg Pedersen
Reply

Hi Nicolai,

I can't do that, the options is not in a file, only the facettype is there. When you have a facet with Field "VariantOptionsInStock" maybe it could use the order field "VariantOptionSortOrder" from the EcomVariantsOptions table.

<?xml version="1.0" encoding="utf-8"?>
<Facets>
  <Settings />
  <Source Repository="eCommerce" Item="Harkila.query" />
  <Facet Name="Color" Type="Field" Field="ProductColorNotAnalyzed" QueryParameter="Color">
    <RenderType Name="Select" SystemName="Select" />
  </Facet>
  <Facet Name="Størrelse" Type="Field" Field="VariantOptionsInStock" QueryParameter="Variants">
    <RenderType Name="Select" SystemName="Select" />
  </Facet>

  <Facet Name="Kollektion" Type="Field" Field="CustomField_ProductCollectionLabel" QueryParameter="Collection">
    <RenderType Name="Select" SystemName="Select" />
  </Facet>
</Facets>

 

You must be logged in to post in the forum