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 system-wide data, you won't regret it.
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.
In order to make sure we're on the same page, let's review the terms we'll be using.
Discount Name
Discount Method
Discount Type
Discount Tier
discount amount
to be applied. All discount types can accept multiple tiers except for the repeat
type.Discount Amount
Discount Logic
allunits|1-10|2-20
or 1-5|5-10|3-50
or 1-50
.Four different methods are provided for discounts to dictate what type of discount is applied based on what criteria
discount_quantity_amount
$/qty
.discount_quantity_percentage
%/qty
.discount_price_amount
$/$
.discount_price_percentage
%/$
.<HTML></div></HTML>
allunits
allunits
is the default discount type for quantity discounts applied to products. If a discount type isn't specified, allunits
is applied.discount_quantity_amount
allunits|2-2
discount_quantity_percentage
allunits|5-10|10-20
incremental
$/$
discount methods.discount_quantity_amount
incremental|3-5
discount_quantity_percentage
incremental|11-10|51-15|101-20
repeat
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.$/$
discount methods. Only accepts one tier.discount_quantity_percentage
repeat|2-100
discount_quantity_percentage
repeat|4-50
single
single
discount type applies one single discount and not a quantity discount across all products.single
is the default discount type for coupons, as it makes the most sense in that context. For %/qty
and %/$
a single
discount type will yield the same discount as allunits
.discount_quantity_amount
single|5-10
<HTML></div></HTML>
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
discount_method=Discount_Name{discount_type|X-A|Y-B|Z-C}
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 to single
if a coupon, or allunits
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.<HTML></div></HTML>
There are three different ways that a discount can be applied - automatically at the product level or and the category level, or manually by the customer in the form of a coupon.
Need a hand creating your discount tiers?
Try out our helper interface to create your discount.
A product level discount applies to a single product and that product only. This is often desired for items that may be ordered in bulk, like screws or other hardware items.
For Product Discounts, allunits
is the default discount type unless otherwise specified.
Product discounts are added to the cart inside the product add to cart link or form that the product is created in.
Product discounts are automatically added with the product when it is added to the cart
Product discounts are displayed as an option for the given product it applies to
As part of a link:
discount_quantity_percentage=My Discount{allunits|5-10|10-20}
As part of a form:
<input type=“hidden” name=“discount_quantity_percentage” value=“My Discount{allunits|5-10|10-20}” />
A category discount is applied to all products that are assigned to that category equally, so category-based discounts work best when the category contains similarly priced items or you work with percentage based discounts.
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.
The default discount type for category discounts is allunits
.
Category discounts are created from within your store's FoxyCart administration, within the settings for each individual category.
Category discounts are automatically added to any products associated the category it applies to.
A discount applied to products from a category level discount appear as an attribute for the relevant products in the cart display. It also modifies the per item price of the product based on the discount.
Discount by a percentage based on the quantity
My Discount
allunits|5-10|10-20
When using a category discount with a type of single, this will distribute the discount equally across all products. This means that in a situation with 2 products, 1 $10 and 1 $20 product, with a discount by an amount based on the quantity of single|1-10
(which says for 1 or more products, discount $10), the discount will apply $5 on each of the two products. Otherwise the discount is applied equally to each product, so for an example, a discount of $10 would mean that $10 is discounted from each product in the category.
Unlike product or category quantity discounts, coupon codes apply one single discount as a line-item in the cart, and do not affect the individual product prices. Coupon codes also can apply to one or many categories, but cannot be product-specific (unless the product is the only product in a given category).
The default discount type for coupons is single
.
Coupons are created from within your store's FoxyCart administration, on the coupons page.
Coupons can be added in two ways.
Coupons can be added with a product add to cart link or form by specifying the coupon
parameter with the coupon's code as the value. This means that the customer won't need to take any action for the coupon to be applied, and will appear in their cart when the order matches the coupons requirements.
A customer can enter a coupon manually on the cart page of the FoxyCart checkout process. If a valid coupon exists for the store, a link to 'Add a coupon' will appear within the carts totals area between the subtotal and the total. Clicking this link will display a text input that customers can enter the code into and click to update the cart and add the coupon.
Something to note here is that if there is currently no valid coupon for the store, then the 'Add a coupon' functionality won't be displayed in the cart. This prevents possible cart abandonment as people may possibly leave your store in search of a coupon that doesn't exist. There are a couple ways that a coupon may not be valid or active:
A coupon is displayed as a line item in the totals section of the cart as a single discount amount.
Coupon codes have a variety of configuration options in addition to the discounting functionality described above.
incremental|1-5|2-10
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.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 category-wide 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 product-specific and category-specific quantity discounts, so it's best avoided if possible.
Below is a list of common discounts in stores detailing their discount method and logic. For applying to a specific type of discount (product, category or coupon), please see details above.
Buy two products, take $2 off of both.
discount_quantity_amount
allunits|2-2
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.
discount_quantity_percentage
allunits|5-10|10-20
Buy two products, get additional products at $5 off. (The first two are not discounted.)
discount_quantity_amount
incremental|3-5
With a quantity of 1-10, 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%.
discount_quantity_percentage
incremental|11-10|51-15|101-20
Buy one, get one free (100% off).
discount_quantity_percentage
repeat|2-100
Buy 3, get the 4th at 50% off.
discount_quantity_percentage
repeat|4-50
Buy any 5 products, get $10 off your order.
discount_quantity_amount
single|5-10