Allows to create a text field for entering a coupon code and a button for processing the code and redirecting the browser to a specific page.
Usually this AJAX handler used on the
Cart page together with
shop:cart action.
You can use this handler for creating the AJAX driven Checkout button on the Cart page. Example:
<label for="coupon_code">Do you have a coupon?</label> <input id="coupon_code" type="text" name="coupon"/>
<input type="button" value="Checkout!" onclick="return $(this).getForm().sendRequest('shop:on_setCouponCode')"/>
<input type="hidden" name="redirect" value="/checkout_start"/>
Specifies the coupon code, required.