When Shopify asks Webshipper for drop-points, we return them sorted by distance.
Shopify then reorders them based on name and price and doesn't provide a way to change that. 

To accommodate our wonderful Shopify customers, we've made it possible to sort the drop-points using Shopify's' Script Editor.
Unfortunately, this is only for Shopify Plus subscriptions.

To start reordering drop-points by distance, download the "Script Editor" from the Shopify App Store.

Find the Script Editor, and add it.

Then open up the app by clicking on it from the app-page.

Create a new script

Pick a blank shipping rate template

Name it "Sort shipping rates"

And enter this code into the script:

i = 25

Output.shipping_rates = Input.shipping_rates.sort_by do |rate|
  i += 1
  is_prefixed = Float(rate.name[0...2]) >= 0 rescue false
 
  order = Float(rate.name[0...2]) rescue i
 
  if is_prefixed
    rate.change_name(rate.name[2...999], message: rate.markup)
  end
 
  order
end


Click "Save and publish", and you're all done with Shopify.


Now Login to your Webshipper account, go to settings, and find Order Channels

Find your Shopify Order Channel, and edit it

Now check "Prefix Droppoints"

And you're all done.

Did this answer your question?