|
@@ -326,8 +326,10 @@ class StoreOrder extends BaseModel
|
|
|
$addr = UserAddress::where('uid', $uid)->where('id', $addressId)->find();
|
|
|
if ($payType == 'offline' && sys_config('offline_postage') == 1) {
|
|
|
$payPostage = 0;
|
|
|
+ $payPostageSh = 0;
|
|
|
} else {
|
|
|
$payPostage = self::getOrderPriceGroup($cartInfo, $addr)['storePostage'];
|
|
|
+ $payPostageSh = self::getOrderPriceGroup($cartInfo, $addr, $storeId)['storePostageSh'];
|
|
|
}
|
|
|
if ($shipping_type === 1) {
|
|
|
if (!$test && !$addressId) return self::setErrorInfo('请选择收货地址!', true);
|
|
@@ -355,13 +357,6 @@ class StoreOrder extends BaseModel
|
|
|
|
|
|
if (!$storeId && !$test && !$free_check) return self::setErrorInfo('请选择下单门店!', true);
|
|
|
if (!SystemStore::verificWhere()->find($storeId) && !$test && !$free_check) return self::setErrorInfo('请选择正确的下单门店!', true);
|
|
|
-
|
|
|
- if ($payType == 'offline' && sys_config('offline_postage') == 1) {
|
|
|
- $payPostageSh = 0;
|
|
|
- } else {
|
|
|
- $payPostageSh = self::getOrderPriceGroup($cartInfo, $addr, $storeId)['storePostageSh'];
|
|
|
- }
|
|
|
- $payPrice = bcadd($payPrice, $payPostageSh, 2);
|
|
|
$cartIds = [];
|
|
|
$totalNum = 0;
|
|
|
$gainIntegral = 0;
|
|
@@ -416,10 +411,12 @@ class StoreOrder extends BaseModel
|
|
|
//是否包邮
|
|
|
if ((isset($other['offlinePostage']) && $other['offlinePostage'] && $payType == 'offline')) $payPostage = 0;
|
|
|
$payPrice = (float)bcadd($payPrice, $payPostage, 2);
|
|
|
+ $payPrice = bcadd($payPrice, $payPostageSh, 2);
|
|
|
} else if ($shipping_type === 2) {
|
|
|
//门店自提没有邮费支付
|
|
|
$priceGroup['storePostage'] = 0;
|
|
|
$payPostage = 0;
|
|
|
+ $payPostageSh = 0;
|
|
|
if (!$pointId && !$test && !$store_order && !$free_check) {
|
|
|
return self::setErrorInfo('请选择自提点', true);
|
|
|
}
|