DISCOUNT_PERCENT=30 CART_DISCOUNT_MESSAGE="Buy 2 or more items and get 30% off the least expensive item"
eligible_items =
Let us show you proven strategies to optimize your Shopify business:
Automatically change prices & more without coupons.
One of the most powerful features of Shopify Plus is the powerful Script Editor. Instead of relying on codes to apply discounts at checkout, Scripts allow merchants to automatically discount items in a customer's cart, and even display message explaining the savings. These discounts can be applied based on advanced criteria such as which items are already in cart and how many.
Below we've put together some examples...
DISCOUNT_PERCENT=30 CART_DISCOUNT_MESSAGE="Buy 2 or more items and get 30% off the least expensive item"
eligible_items =
discount_message = "" discount = 0.999999999999 # It won't actually work with only 1 item in cart unless it calculates a different total, discount * 1 will simply not do
FREEBIE_PRODUCT_ID = 6621649541 CART_TOTAL_FOR_DISCOUNT_APPLIED = Money.new(cents: 100) * 100 DISCOUNT_MESSAGE = "Get a FREE gift for ordering $100 or more"
freebie_in_cart = false