[email protected] Posted January 24, 2021 Share Posted January 24, 2021 Hi, I have a problem, then i filtered products in category page with faceted filter (dropdown type), some filters disappears because there is no product left in search result with this feature. I want that filters not disappear on that case, it is possible? Link to comment Share on other sites More sharing options...
[email protected] Posted January 24, 2021 Author Share Posted January 24, 2021 I figured it myself, I read some similar topics here with no answer, so I put my solution here. It is only need in /modules/ps_facetedsearch/src/Product/SearchProvider.php in runQury function before $filterBlockSearch = new Filters\Block( $facetedSearch->getSearchAdapter(), $context, $this->module->getDatabase() ); add fresh $facetedSearch instance, without filtered products like // this line returns all filter values always $facetedSearch = new Search($context); // now get the filter blocks associated with the current search $filterBlockSearch = new Filters\Block( $facetedSearch->getSearchAdapter(), $context, $this->module->getDatabase() ); Link to comment Share on other sites More sharing options...
phpprestaSama Posted September 16, 2022 Share Posted September 16, 2022 This solution seems not to work on prestashop 1.7.8, does anyone know how to make it work? I would like the search filters on the left not to escape if there are no articles with those characteristics, even if at 0 I would like to continue to see them. Link to comment Share on other sites More sharing options...
mangeur de fleurs Posted February 9, 2023 Share Posted February 9, 2023 Hey, any news about this topic i have the same problem id like to show my filters even if there is no products matching this filter. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now