Developer forum

Forum » Swift » Facet List Ordering by Descending

Facet List Ordering by Descending

Martin Ottesen
Martin Ottesen
Reply

Hi DW, 

We've been notified by a customer that after the upgrade of their Swift, their facet choices are sorted in reverse alphabetical order, whereas before the upgrade it was the actual alphabetical order.

We've found that it's caused by this line of code:

@foreach (FacetOptionViewModel facetOption in facet.Options.OrderByDescending(facetOption => facetOption.Name))

In the template "Swift_ProductListFacets.cshtml". 

Maybe the intention was to sort the choices by how many products are in that category, but that is not the case in practice.

It is also the case on our demo shop here: http://smartpage.swift.dwdemo.dynamicweb-cms.com/e-bikes/classic-e-bikes 


Replies

 

You must be logged in to post in the forum