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

Only allow one discount code to be used

Thread began 5/03/2022 4:18 am by MWilson | Last modified 5/03/2022 11:46 am by MWilson | 168 views | 4 replies

MWilson

Only allow one discount code to be used

Hi Ray, I know I'm probably missing something really simple, but how would I prevent users applying multiple discount codes? I have an automatic 30% discount code on a site which kicks in if the user orders 10 or more books, however my client wants to offer a 50% discount on one book. I don't want users to be able to apply this discount in addition to the 30% discount.

I tried this but it doesn't stop users adding the additional code:

//eCart Rule
function WAEC_Cart_BOOK50OFF() {
$totalDiscount = 0;
if (true && (($this->InCart("6") == true) && ((isset($_SESSION['PromoCode'])?$_SESSION['PromoCode']:"") == "BOOK50") && (!isset($_SESSION['BIGBUNDLE30'])))) {
$totalDiscount += floatVal("6.50");//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule

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