Clear Coupon Codes
Clears coupon codes from the active cart and saves the cart immediately. This is an immediate-execution single tag, not a form tag.
See also: - add_coupon_form, - coupon_count, - coupon_info, - cart_discount, - discounts
Parameters
return
URL to redirect to after coupon codes are cleared. If omitted, no redirect occurs and the current template continues rendering.
return="cart/view_cart"
Behavior and Constraints
Code-backed execution flow:
cart->clear_coupon_codes()save()tag_redirect(return)
Notes:
- Scope is the current cart/session, not a global coupon deletion.
- The tag does not output a form; it runs as soon as the template is parsed.
Example
With redirect:
{exp:cartthrob:clear_coupon_codes return="cart/view_cart"}
Without redirect:
{exp:cartthrob:clear_coupon_codes}