Skip to content

Commit 0c6e4de

Browse files
author
Diego Cabrejas
committed
correct criteria for skipping attribute options from the layered navigation
1 parent 4bc9fcc commit 0c6e4de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(
5353
public function apply(\Magento\Framework\App\RequestInterface $request)
5454
{
5555
$attributeValue = $request->getParam($this->_requestVar);
56-
if (empty($attributeValue)) {
56+
if (empty($attributeValue) && !is_numeric($attributeValue)) {
5757
return $this;
5858
}
5959
$attribute = $this->getAttributeModel();
@@ -95,7 +95,7 @@ protected function _getItemsData()
9595
$options = $attribute->getFrontend()
9696
->getSelectOptions();
9797
foreach ($options as $option) {
98-
if (empty($option['value'])) {
98+
if (empty($option['value']) && !is_numeric($option['value'])) {
9999
continue;
100100
}
101101

0 commit comments

Comments
 (0)