WIN-2308041133\Administrator il y a 5 mois
Parent
commit
50f3a3f7f4

+ 3 - 1
app/common/repositories/store/order/StoreOrderCreateRepository.php

@@ -1510,7 +1510,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
             if (!$mer_form_id) $mer_form_id = $cart['product']['mer_form_id'];
             if (!$order_model) $order_model = $cart['product']['type'];
             if ($mer_form_id && $k) throw new ValidateException('存在表单信息商品,请单独购买');
-            if ($order_model && $k) throw new ValidateException('虚拟商品必须单独购买');
+            if ($order_model==1 && $k) throw new ValidateException('虚拟商品必须单独购买');
+            if ($order_model == 5 && $k) throw new ValidateException('节能油商品必须单独购买');
+            if ($order_model == 6 && $k) throw new ValidateException('礼包商品必须单独购买');
             if ($order_model == 4 && !$this->validateReservation($cart))
                 throw new ValidateException('当前时间已经预约满了~');
             if ($order_type == 0 ) {