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.
Example:
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
code:
//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