From 447a1cff99b818280d9a07b797846b1947033c3d Mon Sep 17 00:00:00 2001 From: BabovicT Date: Fri, 25 Mar 2022 09:26:41 +0100 Subject: [PATCH] Fixed wrong categories returned when concatenator is AND --- .../Index/Filter/CategoryMultiSelectConditionProcessor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php b/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php index c02902f749..1e06ec91b2 100644 --- a/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php +++ b/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php @@ -32,8 +32,9 @@ public function prepareValuesForRendering(FilterConditionInterface $condition, F $field = 'parentCategoryIds'; } + $concatenator = $condition->getConfiguration()['concatenator'] ?: 'OR'; $parsedValues = []; - $rawValues = $list->getGroupByValues($field, true); + $rawValues = $list->getGroupByValues($field, true, $concatenator == 'AND' ? false : true); foreach ($rawValues as $v) { $explode = explode(',', $v['value']);