2 min read • Updated a year ago

Coupon Codes

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.

How are they created

Coupons are created from within your store's FoxyCart administration, on the coupons page.

How are they added to an order

Coupons can be added in two ways.

Automatically

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 (after you've created the coupon in the admin). Multiple coupon codes can be added at one time, separated by a comma, for example: coupon=code1,code2,code3. This means that the customer won't need to take any action for the coupons to be applied, and will appear in their cart when the order matches the coupons requirements.

Here are examples for both link and form add-to-cart types. I've created a coupon in the admin with a code of 20OFF20 that gives a bulk 20% discount when a customer orders 20 or more products.

Link Example

<a href="https://YOURSTORE.foxycart.com/cart?name=Flute+Swab&price=10&coupon=20OFF20">
    Add to Cart
</a>

Form Example

<form action="https://YOURSTORE.foxycart.com/cart" method="post">
    <input="hidden" name="name" value="Flute Swab" />
    <input="hidden" name="price" value=10 />
    <input="hidden" name="coupon" value="20OFF20" />
    <input type="submit" value="Buy It!" />
</form>
Manually

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:

  • The current date is outside of the active date range set for the coupon

  • The coupon has been used as many times as is allowed

How are they displayed

A coupon is displayed as a line item in the totals section of the cart as a single discount amount.

Details

Coupon codes have a variety of configuration options in addition to the discounting functionality described above.


Need Help?

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