diff --git a/models/Category.php b/models/Category.php index f073556..ce911ac 100755 --- a/models/Category.php +++ b/models/Category.php @@ -244,12 +244,11 @@ ) ->innerJoin('product', 'product.id = product_variant.product_id') ->innerJoin('product_category', 'product_category.product_id = product.id') - ->where( - [ - 'product_category.category_id' => $this->id, - 'tax_group.is_filter' => true, - ] - ) + ->innerJoin('tax_group_to_category', 'tax_group.id = tax_group_to_category.tax_group_id') + ->where(['product_category.category_id' => $this->id, + 'tax_group.is_filter' => TRUE, + 'tax_group_to_category.category_id'=>$this->id, + ]) ->andWhere( [ '!=', @@ -273,12 +272,11 @@ ->innerJoin('product', 'product.id = product_option.product_id') ->innerJoin('product_category', 'product_category.product_id = product.id') ->innerJoin('product_variant', 'product_variant.product_id = product.id') - ->where( - [ - 'product_category.category_id' => $this->id, - 'tax_group.is_filter' => true, - ] - ) + ->innerJoin('tax_group_to_category', 'tax_group.id = tax_group_to_category.tax_group_id') + ->where(['product_category.category_id' => $this->id, + 'tax_group.is_filter' => TRUE, + 'tax_group_to_category.category_id'=>$this->id, + ]) ->andWhere( [ '!=', -- libgit2 0.21.4