|
|
@@ -227,7 +227,7 @@ class OrderForm extends Model
|
|
|
// 一个订单只能包含一类商品
|
|
|
$goods = ShopGoods::find()->select('ID,CATEGORY_TYPE')->where(['in', 'ID', $this->goodsId])->andWhere(['STATUS' => 1])->asArray()->all();
|
|
|
if (!$goods) {
|
|
|
- throw new Exception(Yii::t('app', 'productsDoesNotExists'));
|
|
|
+ throw new Exception(Yii::t('app', 'productsDoesSoldOut'));
|
|
|
return;
|
|
|
}
|
|
|
$goodsCategoryType = array_unique(array_column($goods, 'CATEGORY_TYPE'));
|
|
|
@@ -468,7 +468,7 @@ class OrderForm extends Model
|
|
|
if ($v) {
|
|
|
$goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
|
|
|
if (!$goods) {
|
|
|
- throw new Exception(Yii::t('app', 'productsDoesNotExists'));
|
|
|
+ throw new Exception(Yii::t('app', 'productsDoesSoldOut'));
|
|
|
}
|
|
|
if($goods['STORE_NUMS']>0){
|
|
|
if ($goods['TYPE'] == 1 || $goods['TYPE'] == 2) {
|
|
|
@@ -570,7 +570,7 @@ class OrderForm extends Model
|
|
|
if ($v){
|
|
|
$goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
|
|
|
if (!$goods) {
|
|
|
- throw new Exception(Yii::t('app', 'productsDoesNotExists'));
|
|
|
+ throw new Exception(Yii::t('app', 'productsDoesSoldOut'));
|
|
|
}
|
|
|
if ($goods['STORE_NUMS'] >= $this->goodsNum[$k]){
|
|
|
$data = ShopGoods::find()->where(['ID' => $ids[$k]])->one();
|
|
|
@@ -876,7 +876,7 @@ class OrderForm extends Model
|
|
|
if ($v){
|
|
|
$goods = ShopGoods::findOneAsArray('ID=:ID AND STATUS=1',[':ID'=> $ids[$k]]);
|
|
|
if (!$goods) {
|
|
|
- throw new Exception(Yii::t('app', 'productsDoesNotExists'));
|
|
|
+ throw new Exception(Yii::t('app', 'productsDoesSoldOut'));
|
|
|
}
|
|
|
if ($goods['STORE_NUMS'] >= $this->goodsNum[$k]){
|
|
|
$data = ShopGoods::find()->where(['ID' => $ids[$k]])->one();
|