Table of Contents
FoxyCart Coupons and Discounts
Coupon codes can be a very significant marketing tool, so it's important to understand what is and isn't possible with FoxyCart's coupon and quantity discounting functionality. While coupon codes and quantity discounts may not seem inherently related, FoxyCart uses almost the same logic and syntax for both, so we'll discuss them together.
We've found that stores with coupon codes tend to generate 60% more revenue and 83% more transactions than stores not utilizing coupon codes, and those numbers increase (significantly) as the number of coupon codes increases. (Stores with 10 or more coupon codes do 3.8x the revenue and 3x the transactions. According to our data, at least. No joke.) It's not a magic bullet, but simply having coupon codes available can motivate an otherwise “too busy” merchant or marketer to do some email marketing or advertisements promoting the coupon codes. Try it! According to our systemwide data, you won't regret it.
How They Work
It's important to understand that both coupon codes and discounts can apply a value or percentage based discount, based on the value or quantity “tier” of the cart (or of specific categories, or specific products, depending). This is a critical piece to understand, because in FoxyCart you cannot simply apply a “$5 discount” without a tier, even if that tier is simply “minimum quantity of 1 product”.
That might sound confusing, but once you understand the logic and syntax you'll see how it's possible to create very advanced discount structures without much trouble at all.
Important Words to Understand
In order to make sure we're on the same page, let's review the terms we'll be using.

Discount Name
 The text displayed to the customer where a discount is applied. For example, “Spring Cleaning Special” or “Wholesale Quantity Discount”.

Discount Method
 The type of discounting method being applied, such as “discount by the price based on the quantity” or “discount by a percentage based on the cart subtotal”. Details.

Discount Type
 The specific type of discount, such as an “all units quantity discount”, a “one off” discount, a “Buy One, Get One”, or etc. Details.

Discount Amount
 The amount of the discount, either applied as a set dollar (or other currency) amount or as a percentage of the product price. Details.

Discount Tier
 The threshold (either a currency value or a product quantity value) that must be reached in order for a the corresponding
discount amount
to be applied. All discount types can accept multiple tiers except for therepeat
type.
Discount Methods

discount_quantity_amount
 Accepts: A valid discount string.
 Notes: Discounts by an amount, based on the quantity of tobediscounted products. Abbreviated
$/qty
. 
discount_quantity_percentage
 Accepts: A valid discount string.
 Notes: Discounts by a percentage, based on the quantity of tobediscounted products. Abbreviated
%/qty
. 
discount_price_amount
 Accepts: A valid discount string.
 Notes: Discounts by an amount, based on the price of tobediscounted products. Abbreviated
$/$
. 
discount_price_percentage
 Accepts: A valid discount string.
 Notes: Discounts by a percentage, based on the price of tobediscounted products. Abbreviated
%/$
.
Discount Types

allunits
 Also Called: AllUnits Quantity Discounts
 Description: Discounts the price of all of the products affected by the discount. Also referred to as “volume discounts” or “bulk order discounts.”
 Notes:
allunits
is the default discount type for quantity discounts applied to products. If a discount type isn't specified,allunits
is applied.  Examples:
discount_quantity_amount=My Discount{allunits22}
: Buy two products, take $2 off of both.discount_quantity_percentage=My Discount{allunits5101020}
: Orders of five or more get a 10% on every item ordered. Orders of 10 or more get a 20% discount on every item ordered.

incremental
 Also Called: Incremental Quantity Discounts
 Description: Discounts only the units above the tiers you set.
 Notes: Most useful for individual products or many products with the same price. Not useful for
$/$
discount methods.  Examples:
discount_quantity_amount=My Discount{incremental35}
: Buy two products, get additional products at $5 off. (The first two are not discounted.)discount_quantity_percentage=My Discount{incremental1110511510120}
: With a quantity of 110, all products are at 100%. With a quantity of 150, 10 products would be at 100%, 40 would be at 90%, 50 would be at 85%, and 50 would be at 80%.

repeat
 Also Called: Buy One, Get One (BOGO), or “Repeatable Incremental Quantity Discounts”
 Description: Repeatable discounts are somewhat similar to
incremental
discounts, but only have a single tier that repeats. Using this method you can achieve “buy one get one free” types of discounts that repeat (buy 1 get 1, or buy 3 get 3). You can also do something like “buy 3 get the 4th at $5 off”, so buying 5 or 6 would only get a single $5 discount, but buying 8 would get a $10 discount.  Notes: Not useful for
$/$
discount methods. Only accepts one tier.  Examples:
discount_quantity_percentage=My Discount{repeat2100}
: Buy one, get one free (100% off).discount_quantity_percentage=My Discount{repeat450}
: Buy 3, get the 4th at 50% off.

single
 Also Called: Single Discount, OneOff Discount; or Coupon mode
 Description: Unlike the other discount types, the
single
discount type applies one single discount and not a quantity discount across all products.  Notes:
single
is the default discount type for coupons, as it makes the most sense in that context. For%/qty
and%/$
asingle
discount type will yield the same discount asallunits
.  Examples:
discount_quantity_amount=My Discount{single510}
: Buy any 5 products, get $10 off your order.
Syntax
The discount syntax below shows all the pieces to creating a discount. In a coupon or category discount, the discount_method
is specified separate from the
 Example Discount Syntax

discount_method=Discount_Name{discount_typeXAYBZC}
discount_method
: One of the Discount Methods above.Discount_Name
: The text label applied to the discount and displayed to the customer in the cart. For example, “Summer Special” or “Local Coupon Discount”. A discount name is required for discounts to apply properly on cart pageloads.discount_type
: A Discount Type from above. Optional. Will default tosingle
if a coupon, orallunits
otherwise.X
,Y
,Z
: “Discount Tiers”. The threshold at which the Discount Amount will apply.A
,B
,C
: “Discount Amounts”. The amount or percentage discount to apply.
Quantity Discounts: By Product, By Category
Quantity discounts can be applied in two ways: specific to a product, or specific to a category (or categories). To apply a quantity discount to a single product, the discount must be included as a parameter when the product is added to the cart. In this case, the quantity discount will apply to that product and that product only. This is often desired for items that may be ordered in bulk, like screws or other hardware. If a discount is set at the category level, the discount will apply across all the products in the category equally, so categorybased discounts work best when the category contains similarly priced items. Note that category discounts are set on the category's FoxyCart settings page and are always applied to products in that category. If you would like your category discount to be applied only in certain cases (like when a customer is a member of a group that receives the discount), then you can create two categories, one with and one without the discount, and use the discounted category (or not) when adding products to your cart.
It is important to note that the discount tiers only count against the portion of the cart that will actually receive a discount. So a categorywide quantity discount that has a quantity tier of 5 will not apply if there are only 3 products in the category, regardless the number of products in other categories.
All product and category quantity discounts are applied to the products themselves, and not as a separate line item like a coupon code. So if a product is ordinarily $10 and has a 10% discount, the discount is reflected in the product details and the product price becomes $9.
Product quantity discounts can be combined with category quantity discounts, as well as coupon codes, however it will likely result in confusion to mix productspecific and categoryspecific quantity discounts, so it's best avoided if possible.
Coupon Codes
Unlike product or category quantity discounts, coupon codes apply one single discount as a lineitem in the cart, and do not affect the individual product prices. Coupon codes also can apply to one or many categories, but cannot be productspecific (unless the product is the only product in that category).
Coupon codes have a variety of other options in addition to the discounting functionality described above.
 Coupon Name
 The name displayed in the cart, once a coupon has been added. For example, “Loyal Customer 20% Off Coupon”. This allows both the customer and store admin to easily see what coupon has been applied to their cart.
 Coupon Code
 This is the “coupon” itself; the actual text that is distributed by the merchant and entered by the customer. This should be alphanumeric, but care should be taken to ensure it's easily readable (ie. 0 versus O, 1 versus l versus I, etc.).
 Coupon Variations
 FoxyCart allows for a single coupon code to be defined, but to generate multiple distinct coupon variations (up to 100 at a time). This allows for easy creation of multiple unique codes, all with identical discount options, which can be very useful for mail merges or other coupon distribution where any individual coupon code may only have 1 single use, but you may need dozens or hundreds (or thousands).
 Combinable
 If the “combinable” checkbox is left unchecked when creating a coupon it will not be added to the cart if another coupon is already in the cart. Similarly, if this coupon is added first, no other coupons will be able to be added to the cart.
 Taxable
 If the “taxable” checkbox is checked when creating the coupon taxes will be applied before the coupon's discount is applied. Check with your tax professional if you have questions about how you should calculate taxes.
 Category Discounts
 If this box is checked, category discounts will not be applied to the relevant parts of an order (and the coupon discount will be applied instead). As an example, let's say you have a 15% quantity discount (when quantity is 2 or greater) applied for
category=shirts
, and you have 3 shirts in the cart at $10 each. This quantity discount would be $4.50. Now let's say you have a coupon code with this checkbox checked. When that coupon is added to the cart, the quantity discount will be removed, and only the coupon discount will remain. This is most often useful in situations where you do not want coupons discounts to be added together with other discounts.  Line Item Discounts
 This is nearly identical to the “Category Discounts” above, but applies to productlevel discounts.
 Valid Dates
 If the coupon has dates set, it can only be used within those date ranges. The start and end dates are inclusive, so coupon codes can be used on the start and end dates as well.
 Apply to Categories
 Similar to the category quantity discounts, but can be applied to multiple or all categories. So if a coupon code only applies to the TShirt category and there are no TShirts in the cart, no discount will be applied.
 # of Uses (Total)
 If you want to limit the number of uses this coupon as a whole can be used, enter a number here. If, for example, only the first 50 customers can use the coupon, enter 50 here. This relates to coupon variants and the number of uses per code (below). If you have 1 coupon code and 10 uses, the coupon will not be able to be used after 10 successful transactions. If you have 1 coupon with 100 variants but only 50 uses, only the first 50 uses will be allowed, regardless of the number of uses per code.
 # of Uses (Per Code)
 This is similar to the total number of uses, but only limits individual coupon code variants. So if you have 100 coupon code variants and this value is set to 1, each variant will only be able to be used once. The total uses allowed (above) is a higher priority than this, however, so if a coupon's total uses has already been reached then this value doesn't matter.