How can I add a shipping surcharge if the item value is greater than a certain amount?

Highlighted
New Member
2 0 1

I've set up all my shipping rules based on weight. I also need charge an extra flat fee for insurance if the items value is greater than £35.

I can't figure out how to do this - any pointers would be appreciated.

Highlighted
Shopify Expert
4265 32 434

Guarantee this works (but you may not like it, I care not, don't shoot the messenger).

1. Have Shopify turn on Carrier Shipping API calls for your store

2. Listen for checkouts in your App. Any cart adds up to 35 or more, add insurance to the rate. 

3. Any cart less then 35... do the weight thing, return a rate

It is accurate, and easy. If you can write a few lines of code to add that to an App in your shop.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
New Member
1 0 0

You could set up a hidden item called "Insurance Surcharge" or something to that effect, then use a script to automatically add the item to the order if the cart total is greater than £35.

Some quick Googling tells me that adding a script to this effect to your cart.liquid file would do the trick:

<script type="text/javascript">// <![CDATA[
  {% if cart.total_price >= 3500 %}
    jQuery.post('/cart/add.js', {
      quantity: 1,
      id: [your item's id]
    });
  {% endif %}
// ]]></script>

Note that I haven't tested that code, so treat it as an example that you could tweak to make work as you need.

SKULabs.com - Pick and ship all of your orders at once
0 Likes
Highlighted
Shopify Partner
41 0 3

Hi HunkyBill, does this solution still work?

I had a look at https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/carrierservice and I'm not clear whether you meant that the App should generate all the rates along with the surcharge, or if the App is just adding the surcharge.

If it's just adding the surcharge, how does it receive the existing rate, set up in Shopify Store settings?

0 Likes