Is it possible to fetch all our store Locations from within a Checkout Ui Extension? I need to be able to set the location name where the order will be fulfilled from as an order attribute.
Hi Jamalali81,
You should be able to fetch store locations from within a Checkout UI Extension using the Storefront API - specifically by using the locations
query.
Thanks @Liam ! I did try that but it doesn’t return any results. According to the docs this is a “List of the shop’s locations that support in-store pickup.” I need to be able to fetch all locations, not just those that support in-store pickup.
Hi again Jamalali,
You could try setting up an approach where you access the locations API (which would return a list of active inventory locations) with a backend service and then from within the Checkout UI Extension, you could make AJAX/fetch requests to your backend service to fetch location info.
Hi Liam,
From within a Checkout UI Extension, is it possible to retrieve the locations used to fulfilled the current order?
Thank you!