Commit c93dd1106f173b9f266a93b6e97c6250e02ed5f8
1 parent
c4015198
big commti
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
common/modules/product/models/Category.php
| @@ -249,13 +249,14 @@ class Category extends \yii\db\ActiveRecord | @@ -249,13 +249,14 @@ class Category extends \yii\db\ActiveRecord | ||
| 249 | FROM tax_option as ton | 249 | FROM tax_option as ton |
| 250 | LEFT JOIN tax_value_string as tvs ON ton.tax_option_id = tvs.tax_option_id | 250 | LEFT JOIN tax_value_string as tvs ON ton.tax_option_id = tvs.tax_option_id |
| 251 | RIGHT JOIN tax_group ON ton.tax_group_id = tax_group.tax_group_id | 251 | RIGHT JOIN tax_group ON ton.tax_group_id = tax_group.tax_group_id |
| 252 | + RIGHT JOIN tax_group_to_category ON tax_group.tax_group_id = tax_group_to_category.tax_group_id | ||
| 252 | WHERE ton.tax_option_id IN ( | 253 | WHERE ton.tax_option_id IN ( |
| 253 | SELECT po.option_id FROM product_option as po | 254 | SELECT po.option_id FROM product_option as po |
| 254 | WHERE po.product_id IN ( | 255 | WHERE po.product_id IN ( |
| 255 | SELECT product_id FROM product_category WHERE category_id = :category_id | 256 | SELECT product_id FROM product_category WHERE category_id = :category_id |
| 256 | ) | 257 | ) |
| 257 | ) | 258 | ) |
| 258 | - AND tax_group.is_menu = true', | 259 | + AND tax_group.is_menu = true AND tax_group_to_category.category_id = :category_id', |
| 259 | [ | 260 | [ |
| 260 | ':category_id' => $this->category_id | 261 | ':category_id' => $this->category_id |
| 261 | 262 |