Order of custom shipping methods

Is it possible to change the order that custom shipping methods are displayed in? We currently have collection displayed at the top which we would like moved below the other shipping methods.

1 Like

Hi @nigelb,

Unfortunately, this isn’t possible at the moment.

That said, I’ll see if we can make our shipping-rates-list overridable. This would allow the shipping methods to be sorted through our customization feature.

I’ll make sure to report back with an example if this becomes available!

2 Likes

Thanks @Michael that would be handy if it could be made customisable. I’ll let the shop admin know it isn’t possible to do at the moment. Apologies for not replying sooner.
best wishes,
Nigel

We really need this customisation too as we have an option for customers to collect and this is selected by default. Customers are not selecting the correct shipping option and we have to contact them and ask them to pay the correct shipping rate as they did not intend to collect their order.

How far away would this customisation be?

I’m also looking for the order of shipping rates to be customisable. Customers are incorrectly selecting Collect because it is the default rate.

Hello! Happy to say this was included in the release of the 3.3.1.

You’ll be able to override the shipping-rates-list component to either sort or filter any of the shipping methods that would usually display in the cart.

For instance, here’s how to filter the shipping methods by cost (the changes occur in the v-for attribute):

<div hidden id="snipcart" data-api-key="<API_KEY>">
  <shipping-rates-list>
    <component class="snipcart-shipping-rates-list" :is="tag" v-if="!loading">
      <shipping-rates-list-item 
        v-for="rate in rates.sort((a, b) => b.cost - a.cost)"
        :key="rate.slug" 
        :rate="rate"
        :class="{'snipcart-shipping-rates-list-item--highlight': selectedRate == rate.slug}">
      </shipping-rates-list-item>
    </component>
  </shipping-rates-list>
</div>

You’ll find a list of the available properties on the rate item in this section of the documenation.