If this is your first visit, check our documentation. To post, register or login.
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Reset coupon use count for a specific coupon for a specific customer

Reset coupon use count for a specific coupon for a specific customer

Started by fasa_andrew on 25 Nov 2019, 2:29 PM · Views: 11,284

Results 1 to 3 of 3
25 Nov 2019, 2:29 PM
#1
fasa_andrew avatar

fasa_andrew

New Zenner

Join Date:
Jul 2018
Location:
New York, NY
Posts:
1
Plugin Contributions:
0

Reset coupon use count for a specific coupon for a specific customer

I'm running ZC 1.5.5b, kindly do not tell me to upgrade, I know we need to but there are barriers.

I've read through the first five pages of this section of the forum, and performed searches on the FAQs.

How do you reset the coupon use count for a specific coupon for a specific customer? There obviously is a value in the DB somewhere that tracks how many times a customer has used a specific coupon. I need to reset that to zero for a customer, so that they can get a group discount they are entitled to.

26 Nov 2019, 1:34 AM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Reset coupon use count for a specific coupon for a specific customer

First, know your coupon ID. You can navigate to your Coupon Admin, click the coupon and then look at the URL - it will have a cid parameter, something like cid=16. In this example, your coupon ID would be 16.
Next, know your customer ID. It's the first column in your customers listing. Let's say for our example customer ID would be 3568.

Go to Tools->Install SQL Patches and run the following query (BACKUP your database before running any SQL queries):

DELETE FROM coupon_redeem_track WHERE coupon_id = '16' AND customer_id = '3568';

This should allow that single customer to use that coupon again.

My site - Pro ZC Help
My portfolio | My plugins

26 Nov 2019, 11:15 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Reset coupon use count for a specific coupon for a specific customer

balihr:

First, know your coupon ID. You can navigate to your Coupon Admin, click the coupon and then look at the URL - it will have a cid parameter, something like cid=16. In this example, your coupon ID would be 16.
Next, know your customer ID. It's the first column in your customers listing. Let's say for our example customer ID would be 3568.

Go to Tools->Install SQL Patches and run the following query (BACKUP your database before running any SQL queries):

DELETE FROM coupon_redeem_track WHERE coupon_id = '16' AND customer_id = '3568';

> 
> This should allow that single customer to use that coupon again.
Note that this is as if the customer had never used that coupon in the past. If the coupon had say a use count per user of 5, then it will be as if they have used it 0 times and can then use it 5 times. 

It does appear that if you wish to reduce the number of uses say by one, that will want to modify the above to account for a "date" or other field in the associated table and limit to 1 or whatever number of permissions back you wish to offer (e.g. Limit 2, limit 3, etc)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...