From 0e7354ce2040bd6b443a015da96de7e00984f5de Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 27 Nov 2016 14:04:20 +0200 Subject: [PATCH] 14.09.16 --- common/modules/product/models/Category.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php index 6277c40..cae96b3 100755 --- a/common/modules/product/models/Category.php +++ b/common/modules/product/models/Category.php @@ -252,11 +252,7 @@ class Category extends \yii\db\ActiveRecord ->innerJoin('product', 'product.product_id = product_variant.product_id') ->innerJoin('product_category', 'product_category.product_id = product.product_id') ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_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, - ]) + ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE]) ->andWhere(['!=', 'product_variant.stock', 0]); $query2 = (new Query()) @@ -271,11 +267,7 @@ class Category extends \yii\db\ActiveRecord ->innerJoin('product_category', 'product_category.product_id = product.product_id') ->innerJoin('product_variant', 'product_variant.product_id = product.product_id') ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_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, - ]) + ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE]) ->andWhere(['!=', 'product_variant.stock', 0]); $query3 = (new Query()) ->select([ -- libgit2 0.21.4