close ad
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

single item discount by coupon code

Thread began 5/19/2011 5:59 am by sam308940 | Last modified 5/20/2011 1:35 pm by sam308940 | 1784 views | 5 replies


Hi - wow you are fast today!

i did kind of figure things out. but i have an issue with it.

lets say someone adds the item we want on sale, in a size 6 and a size 10. it shows up as 2 items separately in the cart.

when it calculates the discount total, it only calculates for 1 of them, not both. so - i need to add qty to the calculation. how do i grab the total quantity of that item in the cart. (not the qty of total items in cart)

Here is my code so far.....
//eCart Rule
function WAEC_JULES_LUCKY6() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0) && ($this->InCart("SS2411") == true)) && (((isset($_SESSION['discount_code'])?$_SESSION['discount_code']:"") == "LUCKY6") OR ((isset($_SESSION['discount_code'])?$_SESSION['discount_code']:"") == "lucky6"))) {
$totalDiscount += (floatval($this->GetInfo("SS2411", "TotalPrice")) * .3);//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





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