Languages

Enquiries: info@infomagnet.com / +44 (0)20 7193 3323

Avoiding Redemption Limit Issues With Ubercart Coupons

There has been some discussion on the Ubercart Coupons Module about an issue where the user is trying to use a voucher code for the first time and is shown a message telling them "this voucher code has reached its redemption limit" even though the voucher is set correctly in admin for one use per user.  This issue affects anonymous users when they attempt to enter a coupon code.

We have noticed this on one client site so please read the explanation below. Understanding this issue will help ensure that it does not occur on your site.

When an anonymous user makes a purchse from your website, they are given a username and user ID (UID) automatically or, if using a previously used email, their order is associated with an existing UID.
 
When a voucher is used, it is associated with an account so that each user can use the voucher a certain number of times. Often this is set to 1 so that a user can take advantage of an offer only once.
 
Because anon users are always given a user number and username, "anon" (UID 0) never gets to use a voucher.
 
What can happen however is that sometimes an order can be left "in checkout" and then subsequently completed by an admin.  Another scenario is that an admin can create an order manually.

In each of these cases, if admin does not give the user a UID, they keep the UID "0" which is the anonymous user ID.
 
If this happens, the system then sees the voucher as having been used once by anon.
 
You should check to ensure that anon has not used any of your active vouchers. If they have, you will encounter this issue.  To avoid it, find the orders where anon has made a purchase with a voucher and give these users a user ID.

In summary, when manually raising or editing an order, always ensure that the user has an ID, if not, be sure to create one.

Posted by matthew on September 23rd, 2010
Comments: 1

Fantastic tip! V useful and

Fantastic tip! V useful and insightful... thanks

Post new comment

The content of this field is kept private and will not be shown publicly.