Only query in-stock products #7163
-
Hi, How can i query only in-stock products with the medusa-js client? I don't see that kind of filtering capabilities in the I know that I would be able to handle this logic in the frontend but that would make paging quite tricky since there would be a discrepancy between the displayed paged products and the actually queried pages. This is a requirement because my client has a series of products with few in stock and when they go out of stock they typically do not come back in stock. The number of out of stock products will quickly exceed the number of in-stock products. Any ideas are welcome :D Thanks for all the good work on this project - looking forward to 2.0 :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Bump. Still curious if it is possible to filter on inventory_quantity in the products query :) |
Beta Was this translation helpful? Give feedback.
-
hi @stephanboersma - it is not possible out of the box, but you can do such things:
Probably it shall work. |
Beta Was this translation helpful? Give feedback.
hi @stephanboersma - it is not possible out of the box, but you can do such things:
Probably it shall work.