Im working on a Spartacus/Composable Storefront project, and I need to show the product search facets.
But, i dont know where or why, my product facets on the FacetService is empty.
My /search endpoint is listing the active facets in response: All the loaded response from /search endpoint
but when i log the facetService.facetList$, like:
this.facetService.facetList$.subscribe((facetList) => {
console.log(facetList);
});
Is logged:
activeFacets: []
facets: []
Curiously, the ProductListComponentService, when I try to log then, is logged this:
breadcrumbs: []
currentQuery: {query: {…}, url: '/search?q=aveeno%3Arelevance'}
facets: []
freeTextSearch: "aveeno"
pagination: {currentPage: 0, pageSize: 12, sort: 'relevance', totalPages: 1, totalResults: 3}
products: (3) [{…}, {…}, {…}]
sorts: (6) [{…}, {…}, {…}, {…}, {…}, {…}]
type: "productCategorySearchPageWsDTO"
[[Prototype]]: Object
The facets attribute is an empty array. Thats really strange, because i dont have any other place using this attribute all around my project.
Anyone know how to fix this? Thanks for your time.
I tried to debug the productListComponentService, no success.
Is there a custom implementation done? In standard facetservice calls ProductFacetService & it loads facets. Do check if any modification done in your landscape .
Regards KR