Closed (fixed)
Project:
Ubercart Discount Coupons
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2009 at 19:40 UTC
Updated:
14 Jul 2009 at 18:48 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_coupon-5.x-1.x-dev-max_uses_fix.patch | 965 bytes | smccabe |
Comments
Comment #1
longwaveCommitted to CVS.
Comment #2
longwaveAlso committed to D6 branch.
Comment #4
keesje commentedPlease 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
Comment #5
longwaveFor 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!
Comment #6
keesje commentedYou 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!