#how to sort by price in Medusa js in api response
6 messages · Page 1 of 1 (latest)
you can use the order query (variants.prices.amount)
for pagination, use the offset
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
See if this is the issue that concerns you: https://github.com/medusajs/medusa/issues/5539
Anyway team is working on a search functionality that I think will be supersede those fetches.
did you update the offset value everytime? it all works fine too me