Ecommerce for Statamic

Checkout form errors

If your checkout submission failed for any reason, you can output errors with this tag pair.

Tag pairs

missing
Loops through the missing required fields.
gateway
Loops through gateway related errors.

Variables

field
The name attribute of the missing field if used in the missing tag pair. The error field name if used in the gateway tag pair.
field_label
The proper name of the field as defined in the language config file. Available in the missing tag pair.
message
The error message. Available inside the gateway tag pair.

Example

{{ bison:checkout_form_errors }}
  {{ if missing }}
    <p>You are missing the following fields:</p>
    <ul>
    {{ missing }}
      <li>{{ field_label }}</li>
    {{ /missing }}
    </ul>
  {{ endif }}
  {{ if gateway }}
    <p>Your payment couldn't be processed:</p>
    <ul>
    {{ gateway }}
      <li><b>{{ field }}:</b> {{ message }}</li>
    {{ /gateway }}
    </ul>
  {{ endif }}
{{ /bison:checkout_form_errors }}


Problem with this page? Edit it on Github.