Developer forum

Forum » Ecommerce - Standard features » Sorting by discounted prices

Sorting by discounted prices

Lars Pham
Reply

Hi,

So using the Repositories / Indexes I've querying products for at specific group that I want to sort by price (Asc/Desc) and show them in the frontend.

That works fine until there are some of these products that are discounted.
It seems like it is sorting by the original price and not by the discounted price which messes up the order. 

Eg. when I sort by Price - Desc I get this.

  • Product A - 1000 DKK
  • Product B - Discountprice: 700 DKK (Original price 900DKK)
  • Product C - 800 DKK 
  • Product D - 500 DKK

Am I missing something? 


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Lars,

We do not include discounted prices in the index at this time. The reason is that discounts can be very user specific which could make the number of fields in the index explode. We may add them at a later time, but currently, they're not indexed.

For custom solutions where you know your pricing data better -- maybe you don't have user-specific discounts -- you can implement this using a BuilderExtender.

- Jeppe

 

You must be logged in to post in the forum