close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Different Discounts and Coupons

Thread began 3/16/2011 3:46 am by web_assist_mail157665 | Last modified 3/18/2011 12:48 pm by web_assist_mail157665 | 1072 views | 3 replies

Jason ByrnesWebAssist

eCart can do these three, yes, but they will depend on how you configure the cart and database.
Limited Count Coupon Discount: ?
ie Discount first ten users with coupon

Personal Coupon Discount: ?
One shot Personal Coupon Discount: ?
ie Don't allow use of coupon more than once

Discount based on external variable?
ie Number of previous purchases

-Limited Count Coupon Discount:
you will need to add a column to your orders table to record the discount used, and update the store order summary behavior to store the PromoCode session variable in that column of the orders table.

you then need to create a recordset to count the number of times the promo code has already been used, something along the lines of:
SELECT COUNT(PromoCode) as couponCount FROM orders WHERE PromoCode = $_POST['txtpromocode']

store the couponCount value in a session, and use that in the triggers for the discount.

-Personal Coupon Discount:
for this one, you will need to force login and registration for checkout. see the "Applying Register/Login to your checkout" tutorial on the eCart support page:

In the orders table, you will need to store the coupon code and the users ID. similar to the last one, create a recordset to count the number of times the user has used that promo code:
SELECT COUNT(PromoCode) as couponCount FROM orders WHERE PromoCode = $_POST['txtpromocode'] AND userID = $_SESSION['usersID']

store the couponCount in a session and use that in the coupon triggers.

-Discount based on external variable:
the discount can be based on whatever you like, it's a matter of storing the data to drive the coupon, and retrieving it with a recordset.

as long as you are comfortable working with databases and have a good understanding of storing data and retrieving it to a session, these should not be too difficult to set up.

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





Ease of use


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...