How do I get coupon code in db?
I've got a session variable named "PromoCode" that is an input form on the shopping cart page. Works fine for entering a manual discount code and getting that discount rule plugged into the cart math.
I have a database field named "CouponCode" in the MySQLdb Orders table. VarChar(20).
All works fine until I attempt to plug the coupon code text into the db. I'm not able to find where in eCart to bind the text box (or the _$Session[PromoCode] variable) with the Coupon Code into it to a field that will be inserted into that record of the orders table after the order is submitted to the Gateway.
I'm not exactly sure when the order enters the mySQLdb either, but I imagine its after the ping back from the Gateway saying all is fine with the cc.
I'm okay if I have to manually add code, but I'm not sure where to do that either.
All help appreciated.
Thank you!
PS: What I'm truly trying to accomplish is to id a buyer with the coupon code so that I can redirect some of the purchase price to a charity. This is a fund raiser for the charity. I've entered a discount of 1 cent to use the above method only as a means of trapping a coupon code. If someone has a way of trapping the coupon code without using the eCart discount rules, that's fine too. All I want to do is get what is entered into the text box inserted into the db field of that purchase record (Orders table) so that I can tell which buyers were sent by the charity and forward the money we've agreed upon.