GennosukeSama Posted April 4, 2020 Share Posted April 4, 2020 Hi there! I've configured Faceted search according to instructions, have added multiple categories with associated items in the corresponding template configuration, I've checked that positional hooks are active (it shares the same with the category list module. which works fine!) but still I see no faceted search anywhere in the shop! I even inspected the html source and removed hidding classes but all that was rendered in the search facet was the OK button, which did appear after removing the css class. I'm using the default theme. What could I be missing here? I did no changes to existing code. Any ideas are welcomed! Link to comment Share on other sites More sharing options...
AfterGlow93 Posted October 3, 2020 Share Posted October 3, 2020 Hi, After hours of search, i found where is the problem. I recommand to uninstall 3.0.2 version which is not stable (lot of bugs) Uninstall version 3.0.2 and delete folder Install version 2.2.1 (has less options but works well) Than, check the tpl inside /modules/ps_facetedsearch/src . File is : Ps_FacetedsearchProductSearchProvider.php By default, the faceted is unavailable if there are no products matching filters, and if there is ONLY 1 item that match filters (more than 1, it will show up) To remove this, you need to find and edit this code : > This one will show 0 if there are no products, if you don't want it, you can leave the original value $filter->setDisplayed(false) : private function hideZeroValues(array $facets) { foreach ($facets as $facet) { foreach ($facet->getFilters() as $filter) { if ($filter->getMagnitude() === 0) { $filter->setDisplayed(true); } } } } > This one, will show search filters if you have more than 1 product matching filters, if there is 1 product, it will not show up, you can remove it to show "Product(1)" result $facet->setDisplayed( $usefulFiltersCount > 1); Hope this helps you and other people here ! Link to comment Share on other sites More sharing options...
clement.boillat Posted November 4, 2020 Share Posted November 4, 2020 Hi @AfterGlow93 I had exactly the same problems and I'm glad you posted this in the forum, it helped a lot, thank you ! I hope PrestaShop team will solve this soon ! Link to comment Share on other sites More sharing options...
pdyanp Posted November 11, 2020 Share Posted November 11, 2020 On 10/4/2020 at 2:17 AM, AfterGlow93 said: Hi, After hours of search, i found where is the problem. I recommand to uninstall 3.0.2 version which is not stable (lot of bugs) Uninstall version 3.0.2 and delete folder Install version 2.2.1 (has less options but works well) Than, check the tpl inside /modules/ps_facetedsearch/src . File is : Ps_FacetedsearchProductSearchProvider.php By default, the faceted is unavailable if there are no products matching filters, and if there is ONLY 1 item that match filters (more than 1, it will show up) To remove this, you need to find and edit this code : > This one will show 0 if there are no products, if you don't want it, you can leave the original value $filter->setDisplayed(false) : private function hideZeroValues(array $facets) { foreach ($facets as $facet) { foreach ($facet->getFilters() as $filter) { if ($filter->getMagnitude() === 0) { $filter->setDisplayed(true); } } } } > This one, will show search filters if you have more than 1 product matching filters, if there is 1 product, it will not show up, you can remove it to show "Product(1)" result $facet->setDisplayed( $usefulFiltersCount > 1); Hope this helps you and other people here ! I am glad you discussed this issue. I had a similar problem. However, after I tried the ones you suggested, this problem still wasn't resolved. In fact, the Ps_FacetedsearchProductSearchProvider.php file doesn't appear to be executing. I am using version v3.6.0 I beg your kindness to help me. I thank you very much. Link to comment Share on other sites More sharing options...
mainawa Posted May 27, 2021 Share Posted May 27, 2021 I think I have the same problem. It perfectly worked when I was working onto customizing classic theme on a local server. Then I imported it into the test environment and the faceted search doesn't appear anymore. the div appears in the HTML but it's empty. I don't know where to look. Link to comment Share on other sites More sharing options...
Henrik41 Posted September 23, 2021 Share Posted September 23, 2021 On 10/3/2020 at 3:17 PM, AfterGlow93 said: Install version 2.2.1 (has less options but works well) Same issue here with version 3.7.1 Link to comment Share on other sites More sharing options...
El plan de Dan Posted August 6, 2022 Share Posted August 6, 2022 PS 3.8.0 version, 2022 summer and still the same... 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