Ecommerce for Statamic

Coupon details

Outputs details about the currently applied coupon.

Variables

code
The coupon code.
coupon_code
Also the coupon code.
Entry field names
Any field from your discount entry is available within this tag pair.

Example

If a coupon hasn’t been applied, you could use no_results no display a form.

{{ bison:coupon_details }}
  {{ if no_results }}
    {{ bison:coupon_form }}
      <input type="text" name="coupon_code" />
      <input type="submit" />
    {{ /bison:coupon_form }}
  {{ else }}
    Coupon: {{ code }} ({{ title }})
    <a href="/cart/remove-coupon">Remove coupon</a>
  {{ endif }}
{{ /bison:coupon_details }}


Problem with this page? Edit it on Github.