Ecommerce for Statamic

Discount details

Outputs details about active discounts. This does not include coupons.
They are output in the order they are applied (priority).

Variables

Entry field names
Any field from your discount entry is available within this tag pair.
count
The iteration of the discount.
index
Same as count
zero_index
The zero-based index/count.
first
Returns true if it is the first discount.
last
Returns true if it is the last discount.
total_results
Total active discounts.
no_results
True if there are no active discounts

Example

{{ bison:discount_details }}
  {{ if no_results }}
    <p>No discounts</p>
  {{ else }}
    {{ if first }}
      <p>Discounts applied:</p>
      <ol>
    {{ endif }}
        <li>{{ title }}</li>
    {{ if last }}
      </ol>
    {{ endif }}
  {{ endif }}
{{ /bison:discount_details }}


Problem with this page? Edit it on Github.