Change in Shipping Charge
My client's site has been functioning fine for almost a year using U.S. Postal Service lookup for calculating shipping, however he now wants to change it so that 1 or 2 items still use the USPS calculation, but if they buy 3 items the shipping is free (i.e. 0). I can't seem to figure out how to do this.
I tried the following code, but it doesn't work:
//eCart Rule
function WAEC_new_ProRes_USPSShipping() {
$totalShipping = 0;
if (true && (("USPS"=="USPS")&&(isset($_SESSION["new_ProRes_USPS_Quote"]))&&(floatval($_SESSION["new_ProRes_USPS_Quote"]) != 0) || (sizeof($this->Items) == 3))) {
$totalShipping += 0;//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
Please help me fix this code.
Thanks.