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


Quantity Discount Help

Thread began 7/19/2012 4:29 pm by psychobilly1165508 | Last modified 7/23/2012 10:35 pm by psychobilly1165508 | 495 views | 2 replies |


Quantity Discount Help

I have a quantity discount column in my database to group various products for certain discounts.

Number of Items where "qtydiscount" has value of "1" is equal to a value of "2"
Calculation = Flat Rate = $9.98

What I have, works perfect. But I need to multiply the discount based on multiples of 2.
if 4 items were in the cart, it would deduct $19.96
if 6 items were in the cart, it would deduct $29.94
and so on...

I can't seem to figure out the logic on this. Thanks


//eCart Rule
function WAEC_ssdcart_QuantityDiscount() {
$totalDiscount = 0;
if (true && (($this->ConditionalTotal("Quantity", "qtydiscount", "1") == 2))) {
$totalDiscount += 9.98;//Result
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
//eCart Rule

Sign in to reply to this post

Jason ByrnesWebAssist

set the trigger to number of items where qtydiscount = 1 is >= 2

then use this code in the flat rate calculation:

9.98 * ceil(($this->ConditionalTotal("Quantity", "qtydiscount", "1") - 1) / 2)
Sign in to reply to this post


ok, thanks

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





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