Commit 0e7354ce2040bd6b443a015da96de7e00984f5de
1 parent
adbd4119
14.09.16
Showing
1 changed file
with
2 additions
and
10 deletions
Show diff stats
common/modules/product/models/Category.php
@@ -252,11 +252,7 @@ class Category extends \yii\db\ActiveRecord | @@ -252,11 +252,7 @@ class Category extends \yii\db\ActiveRecord | ||
252 | ->innerJoin('product', 'product.product_id = product_variant.product_id') | 252 | ->innerJoin('product', 'product.product_id = product_variant.product_id') |
253 | ->innerJoin('product_category', 'product_category.product_id = product.product_id') | 253 | ->innerJoin('product_category', 'product_category.product_id = product.product_id') |
254 | ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_id') | 254 | ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_id') |
255 | - ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id') | ||
256 | - ->where(['product_category.category_id' => $this->category_id, | ||
257 | - 'tax_group.is_filter' => TRUE, | ||
258 | - 'tax_group_to_category.category_id'=>$this->category_id, | ||
259 | - ]) | 255 | + ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE]) |
260 | ->andWhere(['!=', 'product_variant.stock', 0]); | 256 | ->andWhere(['!=', 'product_variant.stock', 0]); |
261 | 257 | ||
262 | $query2 = (new Query()) | 258 | $query2 = (new Query()) |
@@ -271,11 +267,7 @@ class Category extends \yii\db\ActiveRecord | @@ -271,11 +267,7 @@ class Category extends \yii\db\ActiveRecord | ||
271 | ->innerJoin('product_category', 'product_category.product_id = product.product_id') | 267 | ->innerJoin('product_category', 'product_category.product_id = product.product_id') |
272 | ->innerJoin('product_variant', 'product_variant.product_id = product.product_id') | 268 | ->innerJoin('product_variant', 'product_variant.product_id = product.product_id') |
273 | ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_id') | 269 | ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_id') |
274 | - ->innerJoin('tax_group_to_category', 'tax_group.tax_group_id = tax_group_to_category.tax_group_id') | ||
275 | - ->where(['product_category.category_id' => $this->category_id, | ||
276 | - 'tax_group.is_filter' => TRUE, | ||
277 | - 'tax_group_to_category.category_id'=>$this->category_id, | ||
278 | - ]) | 270 | + ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE]) |
279 | ->andWhere(['!=', 'product_variant.stock', 0]); | 271 | ->andWhere(['!=', 'product_variant.stock', 0]); |
280 | $query3 = (new Query()) | 272 | $query3 = (new Query()) |
281 | ->select([ | 273 | ->select([ |