Coupon discount rule
I've got a ecart with a coupon discount applied. What I try to achieve is giving all products with GutscheinCodeArtikel = 1 a 10%
discount. What I've tried is this:
//eCart Rule
function WAEC_eCart_DegustationWeine10() {
$totalDiscount = 0;
if (true && (($this->ConditionalTotal("Quantity", "GutscheinCodeArtikel", "1") > 0) && ((isset($_SESSION['GutscheinCode'])?$_SESSION['GutscheinCode']:"") == "123456"))) {
$totalDiscount += ($this->TotalColumn("TotalPrice", "GutscheinCodeArtikel", "1") * 0.1);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
But this gives me a discount on the Total of all products in the cart not only the one that have the column GutscheinCodeArtikel = 1. How can I sum all products with column GutscheinCodeArtikel = 1?
Thanks for any help