# Hide the coupon promo banner from carts that already applied a code

Asked by ferdi on 2026-06-03. Tags: cql, audiences, ecommerce, cart.

Banner keeps showing "use code SAVE10" to people who already applied it. looks broken to them.

Current audience:

```cql
cart's stage is "checkout"
```

How do I check the applied coupon in the condition

## 2 answers

### Answer from Lucas Meier (2026-06-03)

The cart variable exposes a `coupon` attribute alongside `stage`, `items`, `total`, `subtotal`, `discount`, and `currency`. So the exclusion is just a negated coupon check:

```cql
cart's stage is "checkout" and not cart's coupon is "SAVE10"
```

One detail worth knowing: undefined values evaluate to false by design in CQL. A cart with no coupon applied simply fails the equality check instead of erroring, so the `not` flips it to true and those shoppers keep seeing the banner. Exactly the behavior you want here.

If you run several codes at once, swap the equality for a list:

```cql
not cart's coupon is in ["SAVE10", "SAVE15"]
```

### Answer from tamar_c (2026-06-04)

Adding to Lucas's answer since you are on the cart already: if you ever need item-level checks rather than cart-level ones, CQL has quantifiers for that:

```cql
some item in cart's items satisfies item's name matches "t-shirt"
```

Handy when the promo only applies to certain products and you want to hide the banner unless a qualifying item is actually in the cart. For the coupon case the plain attribute check is all you need though.
