How to prevent discount stacking in tiered discount code script?

Topic summary

A Shopify store owner seeks to prevent discount code stacking with their tiered discount script. The original script automatically applies percentage discounts based on cart spend thresholds ($30/10% off, $50/15% off, $100/20% off) but allows customers to enter additional discount codes at checkout.

Solution Provided:
A contributor shares an updated script requiring a specific discount code to activate tiered pricing. The modified version supports multiple discount tiers (e.g., STANDARD_CODE and AMBASSADOR_CODE with different discount percentages). Key implementation details:

  • Create 0% discount codes in Shopify Admin
  • The script handles actual discount calculations
  • Each code can trigger different tier structures

Common Issues Raised:

  • Script applies discounts per line item rather than cart subtotal (causing $10 off each item instead of $10 off total order)
  • Questions about restricting eligible items/collections
  • Script not functioning or showing $0 discount in cart
  • Installation confusion (requires Shopify Plus and Script Editor app)

Current Status:
The thread remains open with unresolved questions about cart-level discounting and item restrictions. Note: Shopify Scripts are being deprecated in 2025 in favor of Checkout Functions and authorized apps.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

@CRMW @japple I know it’s not a PLUS script, but our app can apply tiered discounts on the subtotal, rather than on each line_item. Example here.
The app works alongside scripts that use discount codes, which means you can stack a tiered discount applied with our app with a discount applied via Script.