View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How do I get coupon code in db?

Thread began 7/21/2009 5:22 pm by dan361579 | Last modified 3/18/2010 1:16 pm by dan361579 | 1567 views | 11 replies

dan361579

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.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...