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?
Topic summary
A merchant wants to automatically reduce delivery fees when customers order a certain quantity of products, with fees currently set based on distance.
Proposed Solutions:
- Use Shopify’s built-in shipping settings to create quantity-based delivery fee tiers
- For Shopify Plus users: implement Shopify Scripts to apply percentage discounts on shipping rates when cart quantity exceeds a threshold (example code provided for 50% discount at 10+ items)
Current Status:
The merchant reports that their Shopify shipping settings only show price-based conditions (see attached screenshot), not quantity-based options as suggested. The issue remains unresolved, with the merchant unable to locate the quantity threshold settings in their local delivery configuration.
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 :
- Shopify’s Built-in Shipping Rates (Basic Solution)
In Delivery Fee under Shipping and Delivery click on Local Delivery follow as below:
- Orders below X quantity → Full delivery fee
- Orders above X quantity → Reduced delivery fee
- 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.
