discount code to only apply to items with weight of 1
I want to add a discount rule that only gives discounts to items that have a weight of 1
below is my current rule. I tried a few combinations of adding $this->Weight and $this->itemWeight ..... but it still just gave all items the discount. what I want is to only apply the discount to items with weight = 1, not just require that any item in the cart has a weight of 1.
//eCart Rule
function WAEC_pcccart_10NEW() {
$totalDiscount = 0;
if (true && ((sizeof($this->Items) > 0) && ((isset($_SESSION['discount_code'])?$_SESSION['discount_code']:"") == "10NEW") || ((isset($_SESSION['discount_code'])?$_SESSION['discount_code']:"") == "10New") || ((isset($_SESSION['discount_code'])?$_SESSION['discount_code']:"") == "10new"))) {
$totalDiscount += ($this->TotalColumn("TotalPrice") * .10);//Result
}
return WA_eCart_FormatNumber($totalDiscount, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule