evitaDB - Fast e-commerce database
logo
page-background

Price ordering

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.

Price natural

argument:enum(ASC|DESC)
the ordering direction (ascending or descending), default value is ASC
The
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:

Author: Ing. Jan Novotný

Date updated: 2.7.2023

Documentation Source