From 0c6e4decd8ea183842c63818cc3e42a4b999ab78 Mon Sep 17 00:00:00 2001 From: Diego Cabrejas Date: Sat, 26 Nov 2016 15:48:07 +0000 Subject: [PATCH] correct criteria for skipping attribute options from the layered navigation --- .../Magento/CatalogSearch/Model/Layer/Filter/Attribute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php index 8c46242abb110..cfb363fe0dca1 100644 --- a/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php +++ b/app/code/Magento/CatalogSearch/Model/Layer/Filter/Attribute.php @@ -53,7 +53,7 @@ public function __construct( public function apply(\Magento\Framework\App\RequestInterface $request) { $attributeValue = $request->getParam($this->_requestVar); - if (empty($attributeValue)) { + if (empty($attributeValue) && !is_numeric($attributeValue)) { return $this; } $attribute = $this->getAttributeModel(); @@ -95,7 +95,7 @@ protected function _getItemsData() $options = $attribute->getFrontend() ->getSelectOptions(); foreach ($options as $option) { - if (empty($option['value'])) { + if (empty($option['value']) && !is_numeric($option['value'])) { continue; }