less than a minute read • Updated 40 minutes ago
Discount syntax reference
Reference for Foxy discount methods, types, tiers, and syntax, including how the admin Rules builder maps to the underlying parameters.
Reference for Foxy's discount methods, types, and syntax, and how the admin Rules builder maps to them.
Syntax
discount_method=Discount_Name{discount_type|X-A|Y-B|Z-C}discount_method: one of the methods below.Discount_Name: the label shown to the customer. Required.discount_type: optional. Defaults tosinglefor coupons, orallunitsfor product and category discounts.X,Y,Z: tiers (the threshold at which the amount applies).A,B,C: amounts (a value or a percentage).
Discount methods
Method | Abbreviation | Applies |
|---|---|---|
| $/qty | An amount, based on the quantity of discounted products |
| %/qty | A percentage, based on quantity (uses the average of applicable products) |
| // / | An amount, based on the price of discounted products |
| %/$ | A percentage, based on price (uses the average of applicable products) |
Discount types
Type | Also called | Effect | Notes |
|---|---|---|---|
| All-units, volume, bulk | Discounts all affected units | Default for product and category discounts |
| Incremental | Discounts only the units above each tier | Not useful for // / methods |
| Buy One, Get One, repeatable | A single tier that repeats | Accepts one tier only. Not useful for // / methods |
| Single, one-off, coupon mode | One discount, not spread per product | Default for coupons. For percentage methods, equals |
Rules builder mapping (new admin)
Builder control | Maps to |
|---|---|
IF quantity ≥ tier | Quantity-based method ( |
IF total ≥ tier | Value-based method ( |
BY value % percentage |
|
BY value ¤ amount |
|
THEN reduce | A discount |
THEN increase | A surcharge (adds to the total instead of discounting) |
Target: price of each item |
|
Target: price of additional items |
|
Target: price of next item |
|
Target: order total |
|
Tiers
Tier format is
threshold-amount. For example,5-10means "at a threshold of 5, apply 10".Separate multiple tiers with
|. All types accept multiple tiers exceptrepeat, which accepts one.Tiers only count against the portion of the cart that will receive the discount.