2

I am using expresso store as my checkout form (which is already using the checkout & product tags to wrap the products inside of the cart), but need an additional form which consists of a simple textbox and button inside of these tags which will redeem a specific coupon. If I use the HTML tag, the button to go to the next step does not work (as there are now two forms on the page). How would I be able to include this form and then link the 'Redeem' button to a function that I already have in my module? Is there a way to achieve this?

2 Answers 2

4

Follow Justin's good advice for coupon redemption using the built-in Store functionality. See Update Cart on the Checkout Tag Docs.

How would I be able to include this form and then link the 'Redeem' button to a function that I already have in my module?

Then along with using the native update cart function you can run your own method when a coupon is redeemed by putting your method in an extension that uses one of Store's Hooks. See Store's Order Update Hooks.

3

You should be able to add a field for the coupon code into your existing HTML form for the checkout then just include an update cart button next to the coupon code input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.