Commit 70f45199829d47a80406dc4052e24e500c99f6b2

Authored by Administrator
1 parent 446ae306

big commti

Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
common/modules/product/models/Category.php
@@ -210,7 +210,8 @@ class Category extends \yii\db\ActiveRecord @@ -210,7 +210,8 @@ class Category extends \yii\db\ActiveRecord
210 ->innerJoin('product_category', 'product_category.product_id = product.product_id') 210 ->innerJoin('product_category', 'product_category.product_id = product.product_id')
211 ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id') 211 ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id')
212 ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE,'tax_group_to_category.category_id'=>$this->category_id]) 212 ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE,'tax_group_to_category.category_id'=>$this->category_id])
213 - ->andWhere(['!=', 'product_variant.stock', 0]); 213 + ->andWhere(['!=', 'product_variant.stock', 0])
  214 + ->andWhere(['!=', 'product_variant.status', 1]);
214 215
215 $query2 = (new Query()) 216 $query2 = (new Query())
216 ->distinct() 217 ->distinct()
@@ -225,7 +226,8 @@ class Category extends \yii\db\ActiveRecord @@ -225,7 +226,8 @@ class Category extends \yii\db\ActiveRecord
225 ->innerJoin('product_variant', 'product_variant.product_id = product.product_id') 226 ->innerJoin('product_variant', 'product_variant.product_id = product.product_id')
226 ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id') 227 ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id')
227 ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE,'tax_group_to_category.category_id'=>$this->category_id]) 228 ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE,'tax_group_to_category.category_id'=>$this->category_id])
228 - ->andWhere(['!=', 'product_variant.stock', 0]); 229 + ->andWhere(['!=', 'product_variant.stock', 0])
  230 + ->andWhere(['!=', 'product_variant.status', 1]);
229 $query3 = (new Query()) 231 $query3 = (new Query())
230 ->select([ 232 ->select([
231 'tax_option.*', 233 'tax_option.*',