Add Coupon Form (tag pair)

This tag outputs a coupon code (a voucher code) form. CartThrob form tags output HTML forms, so you should not try nesting this tag inside of another form tag. If you want to capture a coupon code in a checkout_form, add a "coupon_code" input field to the checkout_form

Table of Contents

Parameters

See Global Form Parameters.

Variables

See Global Tag Variables.

Conditionals

{if allowed}

If CartThrob coupon settings have been configured to allow the use of coupons/vouchers, content between the "if allowed" conditional will be displayed

{if allowed}Enter your code here{/if}

Form Fields

coupon_code

A text input field for the coupon code.

<input type="text" name="coupon_code" />

Examples

{exp:cartthrob:add_coupon_form return="cart/view_cart"}
    <input type="text" name="coupon_code" />
    <input type="submit" name="Add Coupon" />
{/exp:cartthrob:add_coupon_form}