I want to add some conditions for the layer navigation counter. Basically I want to skip from counting some products.
_getItemsData we have a products collection, and then based on the collection, all the counter for the categories comes form this line :
$optionsFacetedData = $productCollection->getFacetedData('category');
getFacetedData function we have:
$aggregations = $this->searchResult->getAggregations();
This will return all the counters for all categories, attributes, prices etc...
If I add some condition on the product collection nothing happen with the counter, even if i remove all the items from the collection i still have the same numbers for category counter.
Does anyone know how this
getAggregations function works, and how the counter works?
I mean where in the code i can find the actual assignment for the category x and the number of products associated with the category.