have used coupon post to db and orders table
Doing groupon type coupon with daily candy. They will assign the code numbers, to purchasers and I will post the info into DB daily_candy. Database is set up as well as coupon. I tested it and it works as it should. I need to add the following. In the coupon DB, I have a column called couponUsed. It is a tiny integer and now set to 1, this indicates it is not used. When the customer uses the coupon, I want 0 in the couponUsed field and the code posted to the customer's order in the orders DB, the column is called couponCode. This can be done at final checkout to paypal.
If the customer comes back and attempts to reuse the code, is there a way to check the DB and if there is a 0 by the code have a message pop up saying, That coupon has been redeemed"?
Thank you for your help.