Commit a92a8149d0afcf178085bd3affaf22f277ce461c

Authored by Yarik
1 parent 01905ec6

Filter fixing

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
common/modules/product/models/Category.php
... ... @@ -247,7 +247,7 @@ class Category extends \yii\db\ActiveRecord
247 247 ->innerJoin('product', 'product.product_id = product_variant.product_id')
248 248 ->innerJoin('product_category', 'product_category.product_id = product.product_id')
249 249 ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_id')
250   - ->where(['product_category.category_id' => $this->category_id])
  250 + ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE])
251 251 ->andWhere(['!=', 'product_variant.stock', 0]);
252 252  
253 253 $query2 = (new Query())
... ... @@ -269,7 +269,7 @@ class Category extends \yii\db\ActiveRecord
269 269 ->innerJoin('product_category', 'product_category.product_id = product.product_id')
270 270 ->innerJoin('product_variant', 'product_variant.product_id = product.product_id')
271 271 ->innerJoin('tax_value_string', 'tax_value_string.tax_option_id = tax_option.tax_option_id')
272   - ->where(['product_category.category_id' => $this->category_id])
  272 + ->where(['product_category.category_id' => $this->category_id, 'tax_group.is_filter' => TRUE])
273 273 ->andWhere(['!=', 'product_variant.stock', 0])
274 274 ->orderBy('tax_group_sort, tax_option_sort');
275 275 $query3 = (new Query())
... ...