3

Magento 2 Category layered navigatoin,

In magento category layered navigation content comes from below file

vendor/magento/module-catalog-search/Model/Layer/Filter/Category.php

In this file, inside _getItemsData() function one line,

$optionsFacetedData = $productCollection->getFacetedData('category');

I want to know what is the use of getFacetedData('category') in magento.

0

1 Answer 1

1

getFacetedData only exists in the product "fulltext" collection,

i.e. for search results and category pages.

It returns information for the layered navigation, as returned by the search engine (MySQL).

For each of these, it contains the number of results like :

price ranges

categories

filterable attributes

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.