Magento Discunt Codes button not working

I had a client come up to me which a strange magento situation.  The template or extensions they installed seamed to have broken the coupon code submit button on their cart page.  People could not submit a coupon code by clicking the “Apply Coupon” button.  They had to hit enter.  The clients could not find the javascript that was producing the error.  So, I was contacted to provide them with a magneto workaround.  The solution is quite simple.
Find the pesky code:
1
<button type="button" title="Apply Coupon"onclick="discountForm.submit(false)" value="Apply Coupon"><span><span>Apply Coupon</span></span></button>
and change it to:
1
<button title="Apply Coupon" onclick="discountForm.submit(false)"value="Apply Coupon"><span><span>Apply Coupon</span></span></button>
By removing type=”button” the error seems to correct itself.  After removing the type, the button magically started working again!  I know this treating the symptom not the problem, but hey it works.

0 comments:

Post a Comment