Once a coupon has been used, you cannot edit the details of the coupon. The reason for this has to do with the fact that the field where the coupon code goes is disabled once the coupon has been used and the field is required. However, disabled fields are not submitted when a form is submitted and so you get the error "Coupon code field is required.".
I am not sure the best solution for this problem. A couple of options are:
- Don't disable the field, and then in the validation function, simply replace the coupon code with the already saved coupon code code if necessary.
- If you disable the field, also make it non-required. Then once again in the validation function put the coupon code into the correct place.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_coupon.patch | 1.25 KB | j_ten_man |
| Error screenshot | 4.17 KB | j_ten_man |
Comments
Comment #1
j_ten_man commentedHere is a patch that I created. Pretty simple and straightforward. I went with the second option, but really there is almost no difference between the two options in how they are implemented. This is against the 6.x-1.2 version.
Comment #2
longwaveThanks for the report and patch. I've modified your patch to handle used bulk coupons correctly and committed it to CVS.
Comment #3
longwaveA similar fix has also been committed to the 5.x branch.
Comment #4
canuckistani commented*bump* Any interest in rolling a release to address this issue? It greatly impedes functionality ( although I'm fine with the patch for now )
Comment #5
longwave6.x-1.3 and 5.x-1.11 will be available shortly which include the fix for this issue.