Skip to main content
Fixed tag. Improved formatting. Improved wording.
Source Link

I created a new product attribute named, 'decade', which is multiple select filter. eachEach product has zero or more than 1 options to select. I changed it to be 'searchable' and 'use in navigation search (with result)'. But this filter just doesn't show up in the navigation filter section. 

I run a script to obtain all available filters for the category which contains all the product with the attribute assigned. And I got following, I wonder what causes the count always be 0. I did run reindex and still no luck.

{
"availablefilter": {
    "Price": [
        {
            "display": "$0.00 - $99.99",
            "value": "-100",
            "count": "645"
        },
        {
            "display": "$100.00 and above",
            "value": "100-",
            "count": "1"
        }
    ],
    "Decade": [
        {
            "display": "1910s",
            "value": "5459",
            "count": 0
        },
        {
            "display": "1920s",
            "value": "5460",
            "count": 0
        },
        {
            "display": "1930s",
            "value": "5461",
            "count": 0
        },
        {
            "display": "1940s",
            "value": "5462",
            "count": 0
        },
        {
            "display": "1950s",
            "value": "5463",
            "count": 0
        },
        {
            "display": "1960s",
            "value": "5464",
            "count": 0
        },
        {
            "display": "1970s",
            "value": "5465",
            "count": 0
        },
        {
            "display": "1980s",
            "value": "5466",
            "count": 0
        },
        {
            "display": "1990s",
            "value": "5467",
            "count": 0
        },
        {
            "display": "2000s",
            "value": "5468",
            "count": 0
        },
        {
            "display": "2010s",
            "value": "5469",
            "count": 0
        }
    ],
    "Rating": [
        {
            "display": "$0.00 - $99.99",
            "value": "-100",
            "count": "645"
        },
        {
            "display": "$100.00 and above",
            "value": "100-",
            "count": "1"
        }
    ]
}
}
{
  "availablefilter": {
    "Price": [
      {
        "display": "$0.00 - $99.99",
        "value": "-100",
        "count": "645"
      },
      {
        "display": "$100.00 and above",
        "value": "100-",
        "count": "1"
      }
    ],
    "Decade": [
      {
        "display": "1910s",
        "value": "5459",
        "count": 0
      },
      {
        "display": "1920s",
        "value": "5460",
        "count": 0
      },
      {
        "display": "1930s",
        "value": "5461",
        "count": 0
      },
      {
        "display": "1940s",
        "value": "5462",
        "count": 0
      },
      {
        "display": "1950s",
        "value": "5463",
        "count": 0
      },
      {
        "display": "1960s",
        "value": "5464",
        "count": 0
      },
      {
        "display": "1970s",
        "value": "5465",
        "count": 0
      },
      {
        "display": "1980s",
        "value": "5466",
        "count": 0
      },
      {
        "display": "1990s",
        "value": "5467",
        "count": 0
      },
      {
        "display": "2000s",
        "value": "5468",
        "count": 0
      },
      {
        "display": "2010s",
        "value": "5469",
        "count": 0
      }
    ],
    "Rating": [
      {
        "display": "$0.00 - $99.99",
        "value": "-100",
        "count": "645"
      },
      {
        "display": "$100.00 and above",
        "value": "100-",
        "count": "1"
      }
    ]
  }
}

I created a new product attribute named, 'decade', which is multiple select filter. each product has zero or more than 1 options to select. I changed it to be 'searchable' and 'use in navigation search (with result)'. But this filter just doesn't show up in the navigation filter section. I run a script to obtain all available filters for the category which contains all the product with the attribute assigned. And I got following, I wonder what causes the count always be 0. I did run reindex and still no luck.

{
"availablefilter": {
    "Price": [
        {
            "display": "$0.00 - $99.99",
            "value": "-100",
            "count": "645"
        },
        {
            "display": "$100.00 and above",
            "value": "100-",
            "count": "1"
        }
    ],
    "Decade": [
        {
            "display": "1910s",
            "value": "5459",
            "count": 0
        },
        {
            "display": "1920s",
            "value": "5460",
            "count": 0
        },
        {
            "display": "1930s",
            "value": "5461",
            "count": 0
        },
        {
            "display": "1940s",
            "value": "5462",
            "count": 0
        },
        {
            "display": "1950s",
            "value": "5463",
            "count": 0
        },
        {
            "display": "1960s",
            "value": "5464",
            "count": 0
        },
        {
            "display": "1970s",
            "value": "5465",
            "count": 0
        },
        {
            "display": "1980s",
            "value": "5466",
            "count": 0
        },
        {
            "display": "1990s",
            "value": "5467",
            "count": 0
        },
        {
            "display": "2000s",
            "value": "5468",
            "count": 0
        },
        {
            "display": "2010s",
            "value": "5469",
            "count": 0
        }
    ],
    "Rating": [
        {
            "display": "$0.00 - $99.99",
            "value": "-100",
            "count": "645"
        },
        {
            "display": "$100.00 and above",
            "value": "100-",
            "count": "1"
        }
    ]
}
}

I created a new product attribute named, 'decade', which is multiple select filter. Each product has zero or more than 1 options to select. I changed it to be 'searchable' and 'use in navigation search (with result)'. But this filter just doesn't show up in the navigation filter section. 

I run a script to obtain all available filters for the category which contains all the product with the attribute assigned. And I got following, I wonder what causes the count always be 0. I did run reindex and still no luck.

{
  "availablefilter": {
    "Price": [
      {
        "display": "$0.00 - $99.99",
        "value": "-100",
        "count": "645"
      },
      {
        "display": "$100.00 and above",
        "value": "100-",
        "count": "1"
      }
    ],
    "Decade": [
      {
        "display": "1910s",
        "value": "5459",
        "count": 0
      },
      {
        "display": "1920s",
        "value": "5460",
        "count": 0
      },
      {
        "display": "1930s",
        "value": "5461",
        "count": 0
      },
      {
        "display": "1940s",
        "value": "5462",
        "count": 0
      },
      {
        "display": "1950s",
        "value": "5463",
        "count": 0
      },
      {
        "display": "1960s",
        "value": "5464",
        "count": 0
      },
      {
        "display": "1970s",
        "value": "5465",
        "count": 0
      },
      {
        "display": "1980s",
        "value": "5466",
        "count": 0
      },
      {
        "display": "1990s",
        "value": "5467",
        "count": 0
      },
      {
        "display": "2000s",
        "value": "5468",
        "count": 0
      },
      {
        "display": "2010s",
        "value": "5469",
        "count": 0
      }
    ],
    "Rating": [
      {
        "display": "$0.00 - $99.99",
        "value": "-100",
        "count": "645"
      },
      {
        "display": "$100.00 and above",
        "value": "100-",
        "count": "1"
      }
    ]
  }
}
Source Link
Jeff Yu
  • 136
  • 9

Magento 2 Layered Navigation custom attribute with multiselect not showing In filter

I created a new product attribute named, 'decade', which is multiple select filter. each product has zero or more than 1 options to select. I changed it to be 'searchable' and 'use in navigation search (with result)'. But this filter just doesn't show up in the navigation filter section. I run a script to obtain all available filters for the category which contains all the product with the attribute assigned. And I got following, I wonder what causes the count always be 0. I did run reindex and still no luck.

{
"availablefilter": {
    "Price": [
        {
            "display": "$0.00 - $99.99",
            "value": "-100",
            "count": "645"
        },
        {
            "display": "$100.00 and above",
            "value": "100-",
            "count": "1"
        }
    ],
    "Decade": [
        {
            "display": "1910s",
            "value": "5459",
            "count": 0
        },
        {
            "display": "1920s",
            "value": "5460",
            "count": 0
        },
        {
            "display": "1930s",
            "value": "5461",
            "count": 0
        },
        {
            "display": "1940s",
            "value": "5462",
            "count": 0
        },
        {
            "display": "1950s",
            "value": "5463",
            "count": 0
        },
        {
            "display": "1960s",
            "value": "5464",
            "count": 0
        },
        {
            "display": "1970s",
            "value": "5465",
            "count": 0
        },
        {
            "display": "1980s",
            "value": "5466",
            "count": 0
        },
        {
            "display": "1990s",
            "value": "5467",
            "count": 0
        },
        {
            "display": "2000s",
            "value": "5468",
            "count": 0
        },
        {
            "display": "2010s",
            "value": "5469",
            "count": 0
        }
    ],
    "Rating": [
        {
            "display": "$0.00 - $99.99",
            "value": "-100",
            "count": "645"
        },
        {
            "display": "$100.00 and above",
            "value": "100-",
            "count": "1"
        }
    ]
}
}