调整下单校验
This commit is contained in:
parent
d605bf2627
commit
c2d403039c
@ -73,6 +73,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
//虚拟订单自定义数据
|
||||
$order_extend = [];
|
||||
//检查商品类型, 活动商品只能单独购买
|
||||
$allowDelivery = true;
|
||||
foreach ($merchantCartList as $merchantCart) {
|
||||
|
||||
if (($merchantCart['type_id'] != Merchant::TypeSupplyChain) && $address) {
|
||||
@ -108,7 +109,6 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
if ($cart['product']['extend']) {
|
||||
$order_extend = json_decode($cart['product']['extend'], true);
|
||||
}
|
||||
$allowDelivery = true;
|
||||
if ($address) {
|
||||
if ($cart['source'] == 0 || $cart['source'] == 103) {
|
||||
$userAddressCode = ($address['province_code'] ?? '') . ',' . ($address['city_code'] ?? '') . ',' . ($address['district_code'] ?? '') . ',' . ($address['street_code'] ?? '') . ',' . ($address['village_code'] ?? '') . ',' . ($address['brigade_id'] ?? 0);
|
||||
@ -196,11 +196,11 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
$merTake = $merTake && $proTake;
|
||||
$proDelivery = (!count($delivery_way) || in_array('2', $delivery_way, true));
|
||||
$merDelivery = $merDelivery && $proDelivery;
|
||||
$merchantCart['list'][$k]['allow_take'] = $proTake;
|
||||
$merchantCart['list'][$k]['allow_delivery'] = $proDelivery;
|
||||
$merchantCart['list'][$k]['allow_take'] = true;
|
||||
$merchantCart['list'][$k]['allow_delivery'] = $allowDelivery;
|
||||
} else {
|
||||
$merchantCart['list'][$k]['allow_take'] = $_merTake;
|
||||
$merchantCart['list'][$k]['allow_delivery'] = $_merDelivery;
|
||||
$merchantCart['list'][$k]['allow_take'] = true;
|
||||
$merchantCart['list'][$k]['allow_delivery'] = $allowDelivery;
|
||||
}
|
||||
if ($createOrder && $isTake && !$merTake) {
|
||||
$deliveryStatus = false;
|
||||
@ -669,8 +669,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
'key',
|
||||
'platformConsumption',
|
||||
'consumption_money',
|
||||
'consumption_id',
|
||||
'allowDelivery'
|
||||
'consumption_id'
|
||||
) + ['allow_address' => !$allow_no_address, 'order_delivery_status' => $orderDeliveryStatus];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user