Db driven coupon, now is all messed up
Hello,
I thought the coupon was working and now it is all messed up. It gives a discount no matter what is put into the txtPromoCode box. My database is daily_candy. The columns are:
couponId--key
couponCat --planning to delete this column
couponCode-- number that customer puts in
couponAmt --how much it is worth in dollars
couponUsed --a tiny int 1 is not used 0 is used
I have attached my files.
It was working last week and now it is not, as I said no matter what number I put in the box I get a discount.
Thank you for your help.
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.
Karen