|
@@ -318,7 +318,7 @@ class StoreOrder extends BaseModel
|
|
|
$mer_id = [];
|
|
$mer_id = [];
|
|
|
$totalNum = 0;
|
|
$totalNum = 0;
|
|
|
$gainIntegral = 0;
|
|
$gainIntegral = 0;
|
|
|
- $is_wholesale=0;
|
|
|
|
|
|
|
+ $is_wholesale=-1;
|
|
|
foreach ($cartInfo as $cart) {
|
|
foreach ($cartInfo as $cart) {
|
|
|
$cartIds[] = $cart['id'];
|
|
$cartIds[] = $cart['id'];
|
|
|
$totalNum += $cart['cart_num'];
|
|
$totalNum += $cart['cart_num'];
|
|
@@ -328,7 +328,11 @@ class StoreOrder extends BaseModel
|
|
|
if (!$combinationId) $combinationId = $cart['combination_id'];
|
|
if (!$combinationId) $combinationId = $cart['combination_id'];
|
|
|
$cartInfoGainIntegral = isset($cart['productInfo']['give_integral']) ? bcmul($cart['cart_num'], $cart['productInfo']['give_integral'], 2) : 0;
|
|
$cartInfoGainIntegral = isset($cart['productInfo']['give_integral']) ? bcmul($cart['cart_num'], $cart['productInfo']['give_integral'], 2) : 0;
|
|
|
$gainIntegral = bcadd($gainIntegral, $cartInfoGainIntegral, 2);
|
|
$gainIntegral = bcadd($gainIntegral, $cartInfoGainIntegral, 2);
|
|
|
- var_dump($cart);die();
|
|
|
|
|
|
|
+ var_dump(json_encode($cart));die();
|
|
|
|
|
+ $is_wholesale = $cart['is_wholesale'];
|
|
|
|
|
+ if ($is_wholesale!=-1&&$is_wholesale!=$cart['is_wholesale']){
|
|
|
|
|
+ return self::setErrorInfo('批发商品和普通商品不能混合购买!', true);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
$deduction = $seckill_id || $bargain_id || $combinationId;
|
|
$deduction = $seckill_id || $bargain_id || $combinationId;
|
|
|
if ($deduction) {
|
|
if ($deduction) {
|