Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 2.21 KB

File metadata and controls

67 lines (46 loc) · 2.21 KB
title date perex author proofreading preferredLang
Price ordering
2.7.2023
Ordering by selling price is one of the basic requirements for e-commerce applications. The price ordering constraint allows to sort the output entities by their selling price in ascending or descending order.
Ing. Jan Novotný
done
evitaql

Price natural

priceNatural(
    argument:enum(ASC|DESC)
)
argument:enum(ASC|DESC)
the ordering direction (ascending or descending), **default value** is `ASC`

The evita_query/src/main/java/io/evitadb/api/query/order/PriceNatural.javaEvitaDB.Client/Queries/Order/PriceNatural.cs constraint allows output entities to be sorted by their selling price in their natural numeric order. It requires only the order direction and the price constraints in the filterBy section of the query. The price variant (with or without tax) is determined by the priceType requirement of the query (price with tax is used by default).

To sort products by their selling price (currently considering only basic price list and CZK), we can use the following query:

List of products sorted by selling price

List of products sorted by selling price

List of products sorted by selling price

List of products sorted by selling price

List of products sorted by selling price