|
|
@@ -83,7 +83,7 @@ class StoreOrder extends BaseModel
|
|
|
$costPrice = self::getOrderSumPrice($cartInfo, 'costPrice');//获取订单成本价
|
|
|
$vipPrice = self::getOrderSumPrice($cartInfo, 'vip_truePrice');//获取订单会员优惠金额
|
|
|
//如果满额包邮等于0
|
|
|
- $storeType = '无';
|
|
|
+ $collect_on_delivery = 0;
|
|
|
if (!$storeFreePostage) {
|
|
|
$storePostage = 0;
|
|
|
} else {
|
|
|
@@ -154,10 +154,10 @@ class StoreOrder extends BaseModel
|
|
|
|
|
|
if ($temp['collect_on_delivery']==1){
|
|
|
$storePostage = 0;
|
|
|
- $storeType = '到付';
|
|
|
+ $collect_on_delivery = 1;
|
|
|
}
|
|
|
}
|
|
|
- return compact('storePostage', 'storeFreePostage', 'totalPrice', 'costPrice', 'vipPrice', 'totalIntegral','storeType');
|
|
|
+ return compact('storePostage', 'storeFreePostage', 'totalPrice', 'costPrice', 'vipPrice', 'totalIntegral','collect_on_delivery');
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -302,12 +302,12 @@ class StoreOrder extends BaseModel
|
|
|
$payPrice = (float)$priceGroup['totalPrice'];
|
|
|
$payIntegral = (float)$priceGroup['totalIntegral'];
|
|
|
$addr = UserAddress::where('uid', $uid)->where('id', $addressId)->find();
|
|
|
+ $collect_on_delivery=0;
|
|
|
if ($payType == 'offline' && sys_config('offline_postage') == 1) {
|
|
|
$payPostage = 0;
|
|
|
} else {
|
|
|
$payPostage = self::getOrderPriceGroup($cartInfo, $addr)['storePostage'];
|
|
|
- $storeType = self::getOrderPriceGroup($cartInfo, $addr)['storeType'];
|
|
|
-
|
|
|
+ $collect_on_delivery = self::getOrderPriceGroup($cartInfo, $addr)['collect_on_delivery'];
|
|
|
}
|
|
|
if ($shipping_type === 1) {
|
|
|
if (!$test && !$addressId) return self::setErrorInfo('请选择收货地址!', true);
|
|
|
@@ -439,7 +439,7 @@ class StoreOrder extends BaseModel
|
|
|
'deduction_price' => $deductionPrice,
|
|
|
'totalIntegral' => $payIntegral,
|
|
|
'SurplusIntegral' => $SurplusIntegral,
|
|
|
- 'payType' => $payType,
|
|
|
+ 'collect_on_delivery' => $collect_on_delivery,
|
|
|
];
|
|
|
}
|
|
|
$mer_id = array_unique($mer_id);
|
|
|
@@ -463,6 +463,7 @@ class StoreOrder extends BaseModel
|
|
|
'coupon_price' => $couponPrice,
|
|
|
'pay_price' => $payPrice,
|
|
|
'pay_postage' => $payPostage,
|
|
|
+ 'collect_on_delivery' => $collect_on_delivery,
|
|
|
'deduction_price' => $deductionPrice,
|
|
|
'paid' => 0,
|
|
|
'pay_type' => $payType,
|