Reduced Delivery Fee on Certain Quantity of Product

Reduced Delivery Fee on Certain Quantity of Product

Holland2828
Excursionist
22 0 4

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?

Replies 2 (2)

Dotsquares
Shopify Partner
390 25 52

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:

  • Orders below X quantity → Full delivery fee
  • Orders above X quantity → Reduced delivery fee

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.


Shopify Partner Directory | Trustpilot | Portfolio
Holland2828
Excursionist
22 0 4

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.Shipping and delivery · Local delivery · Holland Country & Garden · Shopify.png