added free shipping for order over 150 usd

This commit is contained in:
franknstayn
2022-01-06 19:05:10 +08:00
parent 9917f8b33e
commit e49bff8c5f
3 changed files with 418 additions and 366 deletions

View File

@@ -298,6 +298,11 @@ class PaypalController extends Controller
$items = $m->myCart($cartKey); // item from cart_tmp
$getSubtotal = $m->getSubtotal($cartKey);
// var_dump($getSubtotal);
if($getSubtotal[0]->Subtotal >= 150) {
return $shippingFee = 0;
}
$getSmallItemQty = 0;
$getBulkyItemQty = 0;
$getMaskItemQty = 0;
@@ -363,6 +368,8 @@ class PaypalController extends Controller
$shippingFee = $CAShippingfee;
}
return $shippingFee;
}

View File

@@ -748,7 +748,7 @@ class TeamStoreController extends Controller
if ($getSubtotal[0]->Subtotal <= $getVoucher[0]->VoucherValue) {
return response()->json(array(
'success' => false,
'message' => 'Please add more item to redeem this voucher.',
'message' => 'Please add another item to redeem this voucher.',
));
}
}