Skip to content

Commit 2959663

Browse files
committed
Merge remote-tracking branch 'tango/MC-23113' into Chaika-PR-2019-11-19
2 parents 3da54a0 + 385c605 commit 2959663

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,18 @@ public function apply(\Magento\Framework\App\RequestInterface $request)
5858
if (empty($attributeValue) && !is_numeric($attributeValue)) {
5959
return $this;
6060
}
61+
6162
$attribute = $this->getAttributeModel();
6263
/** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
6364
$productCollection = $this->getLayer()
6465
->getProductCollection();
6566
$productCollection->addFieldToFilter($attribute->getAttributeCode(), $attributeValue);
66-
$label = $this->getOptionText($attributeValue);
67-
if (is_array($label)) {
68-
$label = implode(',', $label);
67+
68+
$labels = [];
69+
foreach ((array) $attributeValue as $value) {
70+
$labels[] = (array) $this->getOptionText($value);
6971
}
72+
$label = implode(',', array_unique(array_merge(...$labels)));
7073
$this->getLayer()
7174
->getState()
7275
->addFilter($this->_createItem($label, $attributeValue));

0 commit comments

Comments
 (0)