浏览代码

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

kevin 1 年之前
父节点
当前提交
0de4527d49
共有 1 个文件被更改,包括 5 次插入0 次删除
  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);
                     // 分期的总期数