diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php index 9c7de08..fa8e5d1 100755 --- a/common/modules/product/models/Category.php +++ b/common/modules/product/models/Category.php @@ -210,7 +210,8 @@ class Category extends \yii\db\ActiveRecord ->innerJoin('product_category', 'product_category.product_id = product.product_id') ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id') ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE,'tax_group_to_category.category_id'=>$this->category_id]) - ->andWhere(['!=', 'product_variant.stock', 0]); + ->andWhere(['!=', 'product_variant.stock', 0]) + ->andWhere(['!=', 'product_variant.status', 1]); $query2 = (new Query()) ->distinct() @@ -225,7 +226,8 @@ class Category extends \yii\db\ActiveRecord ->innerJoin('product_variant', 'product_variant.product_id = product.product_id') ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id') ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE,'tax_group_to_category.category_id'=>$this->category_id]) - ->andWhere(['!=', 'product_variant.stock', 0]); + ->andWhere(['!=', 'product_variant.stock', 0]) + ->andWhere(['!=', 'product_variant.status', 1]); $query3 = (new Query()) ->select([ 'tax_option.*', -- libgit2 0.21.4