3 min read • Updated 3 months ago

Overview

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.

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 MethodThe 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 TypeThe specific type of discount, such as an “all units quantity discount”, a “one off” discount, a “Buy One, Get One”, or etc. Details.
Discount TierThe 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 the repeat type.
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.
Discount LogicThe combination of the discount type (if specified) with the discount tiers and amounts. For example this could be allunits|1-10|2-20 or 1-5|5-10|3-50 or 1-50.

Discount Methods

discount_quantity_amount

Accepts: A valid discount string.
Notes: Discounts by an amount, based on the quantity of to-be-discounted products. Abbreviated $/qty.

discount_quantity_percentage

Accepts: A valid discount string.
Notes: Discounts by a percentage, based on the quantity of to-be-discounted products. Abbreviated %/qty. Note that the value is based on the average of all applicable products, so applying this discount to differently priced items will result in an averaged discount.

discount_price_amount

Accepts: A valid discount string.
Notes: Discounts by an amount, based on the price of to-be-discounted products. Abbreviated $/$.

discount_price_percentage

Accepts: A valid discount string.
Notes: Discounts by a percentage, based on the price of to-be-discounted products. Abbreviated %/$. Note that the value is based on the average of all applicable products, so applying this discount to differently priced items will result in an averaged discount.

Discount Types

allunits

Also Called: All-Units 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. Note that “single” is the default type for coupons.
Examples:

  • Scenario: Buy two products, take $2 off of both.

    • Method: discount_quantity_amount

    • Logic: allunits|2-2

  • Scenario: 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.

    • Method: discount_quantity_percentage

    • Logic: allunits|5-10|10-20

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:

  • Scenario: Buy two products, get additional products at $5 off. (The first two are not discounted.)

    • Method: discount_quantity_amount

    • Logic: incremental|3-5

  • Scenario: With a quantity of 1-10, all products are at 100% (no discount). 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%.

    • Method: discount_quantity_percentage

    • Logic: incremental|11-10|51-15|101-20

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:

  • Scenario: Buy one, get one free (100% off).

    • Method: discount_quantity_percentage

    • Logic: repeat|2-100

  • Scenario: Buy 3, get the 4th at 50% off.

    • Method: discount_quantity_percentage

    • Logic: repeat|4-50

single

Also Called: Single Discount, One-Off 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 %/$ a single discount type will yield the same discount as allunits. Note that “allunits” is the default discount type for product and category discounts.
Examples:

  • Scenario: Buy any 5 products, get $10 off your order.

    • Method: discount_quantity_amount

    • Logic: single|5-10

Syntax

Example Discount Syntax

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.

Notes

  • Time and dates are relative to your store's timezone settings.

  • The coupon code entry block is hidden from the cart unless the store has at least one valid coupon, where “valid” means “applicable here and now”.

  • If a customer attempts to complete a transaction with a coupon that has since become invalid (for example if another customer has since completed a purchase with it, causing the maximum uses limit to be met), then the customer will be sent back to the checkout with the coupon removed and an error message (checkout language string for error coupon if you want to customise it).

Tracking $0 Coupons As Used

By default, only those coupons that apply an actual discount to the cart are tracked as used on completed transactions. This means that if you have a coupon set with a discount tier like 1-0, that won't be tracked as used on the transaction once completed, and won't count against usage restrictions.

To track $0 coupons, you can set up the tier as 0-0 instead, and these coupons, even though they don't apply a discount, will be tracked as used. They will also be counted against any usage restrictions in place for the coupon as well.

General Discount Notes

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.


Need Help?

Did this article answer your questions? Need help with anything? Please click below to contact us.