Hello, im developing a carrier service app for local deliveries (15km distance max).
I have the problem that when shopify choose the origin location which it consider the “best one”, it may be out of range for my carrier service.
I can see that it choose the location according with if it have stock or not of not of a given product. And, if i buy different items that are only available in different stores, it create correctly all the fulfillment orders. That works great.
How ever the problem comes in when for example, i buy a item which have stock in more than one location. In this case shopify choose the location that is set as default in the config.
When this happens, and request for the shipping rates to my callback URL, in some cases the location is out of range of the delivery service BUT there are other locations which are inside my working range and this logic is not considering it.
Further more if i have 2 locations in 2 diferent cities and stock in both locations, it choose the ‘default location’ as origin location even if its in another city!
I upload an image to be more clear:
In this example it choose the location 1. Just because both of them have stock and don’t consider the distance to the destination (not even meters, cities or postal codes).
Is there any way to solve this problem?
