File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/code/Magento/CatalogSearch/Model/Layer/Filter Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,18 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
58
58
if (empty ($ attributeValue ) && !is_numeric ($ attributeValue )) {
59
59
return $ this ;
60
60
}
61
+
61
62
$ attribute = $ this ->getAttributeModel ();
62
63
/** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
63
64
$ productCollection = $ this ->getLayer ()
64
65
->getProductCollection ();
65
66
$ productCollection ->addFieldToFilter ($ attribute ->getAttributeCode (), $ attributeValue );
67
+
66
68
$ labels = [];
67
69
foreach ((array ) $ attributeValue as $ value ) {
68
- $ labels [] = $ this ->getOptionText ($ value );
70
+ $ labels [] = ( array ) $ this ->getOptionText ($ value );
69
71
}
70
- $ label = implode (', ' , $ labels );
72
+ $ label = implode (', ' , array_unique ( array_merge (... $ labels)) );
71
73
$ this ->getLayer ()
72
74
->getState ()
73
75
->addFilter ($ this ->_createItem ($ label , $ attributeValue ));
You can’t perform that action at this time.
0 commit comments