Hi there, I have a coupon code that I’m allowing users to apply at the checkout. This is fine, and the button will only work once while you’re on that page as I set a state on the checkout page. The ‘enter’ button only works when the page’s state is empty.
However, the problem is that if you navigate away from that page, i.e. back to the basket and then to the checkout again, the checkout page loses its state and so the discount code is able to be applied for a second time… and a third, fourth etc if you realise you just need to go back and forward again in your browser!