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"
      }
    ]
  }
}

2 Answers 2

1

There are a couple of options

Use In Layered Navigation

Use In Search Results Layered Navigation

Make sure they are enabled.

Also try Filterable (no results)

Will have to index after changing settings

Also double check decade values are saved for the product under the store scope you are using.

If you are using only one store toggle single store mode if you are not using that already. That simplifies things.

1
  • I configured the attribute with setting you mentioned and count is still 0. That's the reason the filter will not show up. No product associating any option will lead the filter to be silent.
    – Jeff Yu
    Commented Aug 22, 2020 at 13:08
1

I provide what I found for other people who have the same issue.

After several hours' struggle, I fixed it by changing the backend_type of the attribute from 'text' to 'varchar' and re-index. The 'decade' filter are showing again.

Note: Don't forget to copy catalog_product_entity_text's value over to catalog_producut_entity_varchar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.