#How can I fetch only products from one store in store/products?"

1 messages · Page 1 of 1 (latest)

eager pulsar
#

I've already made the modifications to have multiple independent stores in Medusa. Now I want to fetch only products from a specific store on the frontend. How can I achieve that?

eager pulsar
#

Do I need to create a custom endpoint to do this?

eager pulsar
#

??

thick tartan
#

As I understand it, yes you have to create a custom endpoint as /store/products provides no way to filter based on custom fields

eager pulsar
#

Any other ideas on how I can do this?

astral cove
#

Override route GET product list and try to use middleware or extend your function get storeId from request then inject to filter orm