From 01d06e32c2fcf6ad91b09aea67dae0964b6bf80b Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 27 Nov 2016 13:51:47 +0200 Subject: [PATCH] add variantSku --- models/Category.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) 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