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.

CommentFileSizeAuthor
#1 uc_coupon.patch1.25 KBj_ten_man
Error screenshot4.17 KBj_ten_man

Comments

j_ten_man’s picture

StatusFileSize
new1.25 KB

Here 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.

longwave’s picture

Thanks for the report and patch. I've modified your patch to handle used bulk coupons correctly and committed it to CVS.

longwave’s picture

Status: Active » Fixed

A similar fix has also been committed to the 5.x branch.

canuckistani’s picture

*bump* Any interest in rolling a release to address this issue? It greatly impedes functionality ( although I'm fine with the patch for now )

longwave’s picture

6.x-1.3 and 5.x-1.11 will be available shortly which include the fix for this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.