I’ve been altering an ecommerce template to better suit us and I’ve managed to break one of the elements that I really like about the page.
I moved a collapsible div that allows the user to enter a copuon from the top of the page to the bottom, since it made more sense to have it by the order total. The problem is that moving the code from the top to the bottom broke the collapsing element of the div. Now it’s just expanded by default and can’t be retracted even by clicking the link.
Try validating your html. When you moved the coupon form you placed it inside the order form and nested forms are not valid. That might be causing your problem. Try moving it below the closing tag of the order form and see if it works then.
Of course you would then need to check which button had submitted the form and act accordingly. If you want it separate then it needs to be outside of the other form and in a form of its own as before.