Count of Coupons in Cart
Returns the number of coupon codes currently stored on the active cart. Use this when you want a quick count (for example, to show whether any coupon has been applied) without looping through coupon details.
See also:
Parameters
This tag has no tag-specific parameters.
Behavior and Constraints
Code-backed behavior:
- Reads
cart->coupon_codes(). - Returns
count(...)of that list. - Immediate-execution single tag (not a form or tag pair).
Example
Code:
{exp:cartthrob:coupon_count}