Ver Fonte

EPP-upgrade: Not allow select EPP-product and Standard-product

kevin há 1 ano atrás
pai
commit
0de4527d49
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      common/models/forms/OrderForm.php

+ 5 - 0
common/models/forms/OrderForm.php

@@ -898,6 +898,11 @@ class OrderForm extends Model
                         throw new Exception(Yii::t('app', 'allowOnlyOne'));
                     }
 
+                    // 分期商品不可以和其他商品一起购买
+                    if (count($this->goodsId) != 1) {
+                        throw new Exception(Yii::t('app', 'allowOnlyOne'));
+                    }
+
                     $userStage = Instalment::getStage($userId);
                     $userInstalmentInfo = Instalment::getInfo($userId);
                     // 分期的总期数