Comining shipping and charges in one amount
Hi, I was able to set up staggered shipping charges and charges for shipping insurance.
Shipping charges are a flat rate depending on cart totals, shipping insurance charges are 1% or the cart total.
I was asked to combine both amounts into one number displayed on one line.
This is the rule for the separate charges. I am a bit clueless how to combine them.
//eCart Rule
function WAEC_segufix_shippingInsurance() {
$totalCharge = 0;
if (true && (($this->TotalColumn("TotalPrice") >= 0)) && (isset($_SESSION['mylocation3']) && $_SESSION['mylocation3'] == 'germany')) {
$totalCharge += (($this->TotalColumn("TotalPrice") - ($this->GetDiscounts()) * 0) * 0.01);//Result
}
return WA_eCart_FormatNumber($totalCharge, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
//eCart Rule
function WAEC_segufix_Shipping750() {
$totalShipping = 0;
if (true && ((isset($_SESSION['germanShipping_upto750']) && ((isset($_SESSION['mylocation3'])?$_SESSION['mylocation3']:"") == "germany")) && ($this->TotalColumn("TotalPrice") < 750))) {
$totalShipping += floatVal("6.50");//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule