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 | 252 | ->innerJoin('product', 'product.product_id = product_variant.product_id') |
253 | 253 | ->innerJoin('product_category', 'product_category.product_id = product.product_id') |
254 | 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 | 256 | ->andWhere(['!=', 'product_variant.stock', 0]); |
261 | 257 | |
262 | 258 | $query2 = (new Query()) |
... | ... | @@ -271,11 +267,7 @@ class Category extends \yii\db\ActiveRecord |
271 | 267 | ->innerJoin('product_category', 'product_category.product_id = product.product_id') |
272 | 268 | ->innerJoin('product_variant', 'product_variant.product_id = product.product_id') |
273 | 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 | 271 | ->andWhere(['!=', 'product_variant.stock', 0]); |
280 | 272 | $query3 = (new Query()) |
281 | 273 | ->select([ | ... | ... |