Ok, so it's working except I want to not calculate shipping (with UPS) when there's a value in the cart of either 'promo' or 'ship_collect' from a column named 'Shpping_Type'. I am editing thru the eCart Object editor and tried:
//eCart Rule
function WAEC_eCart1_UPSShipping() {
$totalShipping = 0;
if (true && (($this->ConditionalTotal("Quantity", "ShippingType", "promo") < 1) || ($this->ConditionalTotal("Quantity", "ShippingType", "ship_collect") < 1) && ("UPS"=="UPS")&&(isset($_SESSION["eCart1_UPS_Quote"]))&&(floatval($_SESSION["eCart1_UPS_Quote"]) != 0))) {
$totalShipping += floatval($_SESSION["eCart1_UPS_Quote"]) + 4;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
and tried this:
//eCart Rule
function WAEC_eCart1_UPSShipping() {
$totalShipping = 0;
if (true && (($this->InCart("promo") != true) || ($this->InCart("ship_collect") != true) && ("UPS"=="UPS")&&(isset($_SESSION["eCart1_UPS_Quote"]))&&(floatval($_SESSION["eCart1_UPS_Quote"]) != 0))) {
$totalShipping += floatval($_SESSION["eCart1_UPS_Quote"]) + 4;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
and tried this:
//eCart Rule
function WAEC_eCart1_UPSShipping() {
$totalShipping = 0;
if (true && (($this->InCart("promo") != true) && ($this->InCart("ship_collect") != true) && ("UPS"=="UPS")&&(isset($_SESSION["eCart1_UPS_Quote"]))&&(floatval($_SESSION["eCart1_UPS_Quote"]) != 0))) {
$totalShipping += floatval($_SESSION["eCart1_UPS_Quote"]) + 4;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
But, it Keeps calculating shipping ? I want it to skip altogether. What is wrong with this logic?