#how to sort by price in Medusa js in api response

6 messages · Page 1 of 1 (latest)

serene totem
#

Is there any way we can sort by price and paginate in Medusa

craggy zephyr
#

you can use the order query (variants.prices.amount)
for pagination, use the offset

serene totem
#

But when I sort from highest to low using
localhost:9000/store/products?limit=6&offset=18&order=-variants.prices.amount
This shows the same 6 project every time

#

It is working fine for low to high

slate patrol
craggy zephyr