Template Tags: Discounts & Coupons/Vouchers
CartThrob can handle both discounts (which are automatically applied) and coupons/vouchers (customer uses a coupon code to register a discount).
Coupons can be added and removed from the cart. Discounts are processed automatically based on the cart contents or other factors and can’t be removed, except by the discount itself being removed or disabled.
Adding, deleting coupons/vouchers
- add_coupon_form Creates a form that can be used to add a coupon code. Do not try to put this form inside another form tag read more for details
- clear_coupon_codes Place this on a template to clear coupons out of the system
- cart_discount Outputs the amount of discount currently applied (includes coupons & discounts)
- cart_discount_percent_of_subtotal Outputs the amount of discount currently applied as a percentage of subtotal(includes coupons & discounts)
- cart_discount_percent_of_total Outputs the amount of discount currently applied as a percentage of the total (includes coupons & discounts)
- coupon_info Outputs the currently applied coupons codes
- discount__info Outputs the currently applied discounts
One limitation of the current system is that there is no tag that will output information about any currently active applied discounts.