I got this code off of Craft Commerce, I had caught an error on the site previously so I'm thinking there might be an error here? I've put it in my file but when I input anything in the form I don't have any response of any kind. I don't get an error message or success message, it just redirects back to the cart and the pricing also remains exactly the same. Thanks!
<form method="POST">
<input type="hidden" name="action" value="commerce/cart/updateCart">
<input type="hidden" name="redirect" value="store/cart">
{{ getCsrfInput() }}
<span class="{% if cart.getError('couponCode') %}has-error{% endif %}">
<input type="text" name="couponCode" class="{% if cart.getError('couponCode') %}has-error{% endif %}" value="{{ cart.couponCode }}" placeholder="{{ "Coupon Code"|t }}">
</span>
<input type="submit" value="{% if cart.couponCode %}Change{% else %}Apply{% endif %} Coupon"/>
</form>
cart.getErrors()
return? Guessing there is a validation error on one of the other cart properties.cart.getErrors()
doesn't return anything, at least not in this code.