updated shipping fees

This commit is contained in:
franknstayn
2022-01-21 20:13:46 +08:00
parent 0b550e1aba
commit d104563ce6
3 changed files with 15 additions and 7 deletions

View File

@@ -299,7 +299,7 @@ class PaypalController extends Controller
$items = $m->myCart($cartKey); // item from cart_tmp
$getSubtotal = $m->getSubtotal($cartKey);
// var_dump($getSubtotal);
if($getSubtotal[0]->Subtotal >= 150) {
if($getSubtotal[0]->Subtotal >= 99) {
return $shippingFee = 0;
}
@@ -355,10 +355,18 @@ class PaypalController extends Controller
$countryCode = "";
if (count($array_address_book) > 0) {
$countryCode = $array_address_book[0]->CountryCode;
$CAShippingfee = ceil($CAShippingfee / 2) * 50;
$CAShippingfee = ceil($CAShippingfee / 1) * 50;
}
// $getSmallItemQty = ceil($getSmallItemQty / 3) * 8.99;
if($getSmallItemQty >= 2) {
$getSmallItemQty = ceil(($getSmallItemQty - 1) / 1) * 2.49;
$getSmallItemQty = $getSmallItemQty + 8.99;
}else {
$getSmallItemQty = 8.99;
}
$getSmallItemQty = ceil($getSmallItemQty / 3) * 8;
$getBulkyItemQty = ceil($getBulkyItemQty / 1) * 8;
$getMaskItemQty = ceil($getMaskItemQty / 25) * 8;
$getDGSItemQty = ceil($getDGSItemQty / 4) * 5;
@@ -367,9 +375,7 @@ class PaypalController extends Controller
if ($countryCode == "CA") {
$shippingFee = $CAShippingfee;
}
return $shippingFee;
}