All things Shopify and commerce
We have set delivery fees for the local areas depending on the distance. However, we reduce the delivery fee if a customer orders a certain quantity or more of a product. Is there a way to set that condition so the reduced fee automatically applies during checkout?
Hi @Holland2828 You can set up automatic delivery fee adjustments in Shopify based on order quantity using Shopify’s Shipping & Delivery settings or Shopify Scripts :
1) Shopify’s Built-in Shipping Rates (Basic Solution)
In Delivery Fee under Shipping and Delivery click on Local Delivery follow as below:
2) Shopify Scripts (For Shopify Plus)
# Get the number of items in the cart
cart_quantity = Input.cart.line_items.sum { |item| item.quantity }
# Set delivery fee based on quantity
if cart_quantity >= 10
ShippingRates.each do |shipping_rate|
shipping_rate.apply_discount(shipping_rate.price * 0.5, message: "Bulk Order Discount Applied!")
end
end
Output.shipping_rates = ShippingRates
Let me know if this works for you.
Dotsquares Ltd
Problem Solved? ✔ Accept and Like solution to help future merchants.
Thanks for the reply. I'm not seeing options for orders above or below X quantity. I've attached a screenshot of the only conditional option I have.
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025