Shipping Discounts
Rich Landing Bundle – Shipping Discount Function Summary
- Runs on Shopify Function target:
cart.delivery-options.discounts.generate.run. - Works globally across the cart, not per bundle.
- Scans all cart lines, detects bundle instances, determines the single best shipping tier, and applies it to all delivery groups.
Discount Types
shipping_percentage
- Reduces shipping by a percentage.
discountValue: 50→ 50% off shipping.
free_shipping
- 100% off shipping (free shipping).
- Always takes priority over any percentage discount.
Global Priority Logic
When multiple bundles are in the cart:
- Evaluate each bundle's applicable shipping tier.
- If any bundle qualifies for
free_shipping, free shipping is applied. - Otherwise, choose the highest
shipping_percentagevalue. - Apply only that single best discount to shipping (no stacking).
Examples:
- Bundle A: 50% off shipping; Bundle B: free shipping → customer gets free shipping.
- Bundle A: 20% off; Bundle B: 40% off → customer gets 40% off.
How It Applies to Delivery Groups
- Every checkout has one or more delivery groups (items shipping together).
- The function creates a discount candidate per delivery group.
- Discount value is always a percentage:
free_shipping→ 100%.shipping_percentage→discountValue.- Selection strategy:
ALL→ applies to all delivery options in each group, not just the cheapest.
Tier Qualification
Shipping tiers use the same qualification rules as product tiers.