Hi there,
I am trying to sort products based on the price from the price matrix. Here's what I did:
1. Added a new field to the index called PriceDkk and mapped it to the field ProductPrice|DKK|DK|WithVAT (which is autogenerated from the matrix)
2. Rebuilt the index
3. Updated Designs/Swift/Paragraph/ProductListFacets/Sorting.cshtml to use PriceDkk instead of Price when sorting by price.
4. Enabled the price filter in the Filters paragraph.
Now when I choose Sort by Price Low/High, the query string is updated with SortBy=PriceDkk or SortBy=-PriceDkk
However, the results are in classical DynamicwWeb style: not what you'd expect.
Sort by PriceDkk results in this:
DKK 15,00
DKK 31,25
DKK 15,00
DKK 18,75
DKK 31,25
DKK 28,98
Sort by -PriceDkk results in this:
DKK 28,98
DKK 31,25
DKK 18,75
DKK 15,00
DKK 31,25
DKK 15,00
So reverting the sort direction reverses the results, but neither list is sorted.
In case it matters: one of the products on the page does not have a price in the matrix. One of the products is a variant with two options each having the same price.
What am I missing?
Imar