is_coupon_form_enabled store setting to control whether the coupon code section appears in your Zid storefront theme.false, your theme must not render any coupon-related interface. When the value is true, null, or missing, the coupon section must remain visible.{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}
{% if coupon_form_enabled %}
<div data-coupon-section>
{# Coupon input, apply button, applied coupon details, and remove button #}
</div>
{% endif %}store.settings.checkout.is_coupon_form_enabled| Value | Required theme behavior |
|---|---|
false | Do not render the coupon section |
true | Render the coupon section |
null | Render the coupon section |
| Missing | Render the coupon section |
!= false instead of a standard truthy check so the coupon section remains visible when the setting is null or unavailable.{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}{% if store.settings.checkout.is_coupon_form_enabled %}null or missing.Store settings may be cached for up to 10 minutes. After saving the setting, the storefront may take up to 10 minutes to reflect the change.
is_coupon_form_enabled is false, do not render any coupon-related interface.{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}
{% if coupon_form_enabled %}
<section class="cart-coupon" data-coupon-section>
<label for="coupon-code">
Coupon code
</label>
<input
id="coupon-code"
name="coupon_code"
type="text"
data-coupon-input
>
<button type="button" data-apply-coupon>
Apply
</button>
{% if cart.coupon %}
<div data-applied-coupon>
<span>{{ cart.coupon.code }}</span>
<button type="button" data-remove-coupon>
Remove
</button>
</div>
{% endif %}
</section>
{% endif %}<div
class="cart-coupon {% if store.settings.checkout.is_coupon_form_enabled == false %}hidden{% endif %}"
>
...
</div>{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}
{% if coupon_form_enabled %}
<div class="cart-coupon">
...
</div>
{% endif %}{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}
{% if coupon_form_enabled %}
<section class="cart-coupon" data-coupon-section>
{% if cart.coupon %}
<div class="cart-coupon__applied" data-applied-coupon>
<span>
Applied coupon: {{ cart.coupon.code }}
</span>
<button
type="button"
data-remove-coupon
>
Remove coupon
</button>
</div>
{% else %}
<div class="cart-coupon__form">
<label for="coupon-code">
Coupon code
</label>
<input
id="coupon-code"
name="coupon_code"
type="text"
autocomplete="off"
data-coupon-input
>
<button
type="button"
data-apply-coupon
>
Apply coupon
</button>
<div
role="alert"
aria-live="polite"
data-coupon-message
></div>
</div>
{% endif %}
</section>
{% endif %}is_coupon_form_enabled is true, confirm that:is_coupon_form_enabled is false, confirm that:null or the property is missing, confirm that:store.settings.checkout.is_coupon_form_enabled.{% if store.settings.checkout.is_coupon_form_enabled %}{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}false.store.settings.checkout.is_coupon_form_enabled and wrap the complete coupon section in a Jinja if block.{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}
{% if coupon_form_enabled %}
{# Complete coupon section #}
{% endif %}if is_coupon_form_enabled?is_coupon_form_enabled != false.true, null, or missing.false, hide the complete coupon area, including the applied coupon label and remove button.store.settings.checkout.is_coupon_form_enabled.false value hides the coupon section.true, false, null, and a missing value.{% set coupon_form_enabled = store.settings.checkout.is_coupon_form_enabled != false %}
{% if coupon_form_enabled %}
{# Complete coupon section #}
{% endif %}false. Keep it visible when the value is true, null, or missing.