Project:Ubercart Discount Coupons
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Max uses isn't actually working, there is a problem with the SQL statement and checking status > 0 when status is not an int. Here is a patch that uses the status weight to do it properly. Another developer were I work made this patch and I reviewed it, also it is being used on a live site so it shouldn't need much more review.

AttachmentSize
uc_coupon-5.x-1.x-dev-max_uses_fix.patch965 bytes

Comments

#1

Status:needs review» fixed

Committed to CVS.

#2

Also committed to D6 branch.

#3

Status:fixed» closed (fixed)

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

#4

Version:5.x-1.x-dev» 6.x-1.1
Status:closed (fixed)» active

Please close again when I'm wrong.

Max uses is not working in 6.x-1.1. Not for all users nor per user.
I still can apply a coupon code multiple times with max uses set to 1. I tested several existing users and anonymous.
D6.13 + Ubercart 2.0 rc3. Pretty clean install.

Thanks,

Kees

#5

Status:active» postponed (maintainer needs more info)

For a coupon to be counted as used, the order it was attached to must be in "Payment received", "Processing" or "Completed" state; this avoids orders that were abandoned at "in checkout" from counting towards coupon usage, when it is likely they will never be completed. What order statuses were you using in your tests? This really points to the fact I need to write some actual documentation for this module!

#6

Status:postponed (maintainer needs more info)» closed (fixed)

You are right indeed. The test orders where still in "checkout", setting one to e.g. "payment recieved" activates the counter and the max limit.
Thanks!

nobody click here