close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Different Discounts and Coupons

Thread began 3/16/2011 12:46 am by web_assist_mail157665 | Last modified 3/18/2011 9:48 am by Jason Byrnes | 1386 views | 3 replies |

web_assist_mail157665

Different Discounts and Coupons

Can e-Cart do the following please?

Coupon Discount: Yes

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

tia

Sign in to reply to this post

Jason ByrnesWebAssist

eCart can do these three, yes, but they will depend on how you configure the cart and database.
[quote]
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
[quote]

-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:
ecart/

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.

Sign in to reply to this post

web_assist_mail157665

Thanks for the feedback Jason - much appreciated.

Sorry for delay - have been very busy.

Happy to code in PHP and tinker with SQL. Will take a look at your suggestions.

regards

Paul

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

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