Jump to content

Need help with faceted search


denkbeter

Recommended Posts

On the website when i filter products using faceted search attributes and functions the module hides the attributes and functions that have no matching products. I would like them to always show so it is more clear to the customer what is selected and what the options are even if no products are found.

Can anyone point me in the right direction where to do this?

Prestashop version: 1.7.6.2

Edited by denkbeter (see edit history)
Link to comment
Share on other sites

On 12/25/2019 at 11:23 PM, PCQUATRO said:

You have to be more specific!!! use images to illustrate your problem!

Best Regards

Thank you for your reply. Here is an illustration showing the issue and the desired situation. I want the customer to be able to switch between categories for example, now it hides the empty once which makes things confusing.

 

 

Edited by denkbeter (see edit history)
Link to comment
Share on other sites

15 hours ago, denkbeter said:

Thank you for your reply. Here is an illustration showing the issue and the desired situation. I want the customer to be able to switch between categories for example, now it hides the empty once which makes things confusing.

Why would somebody want to search for something that doesn´t exist!?

The easy way would be to look for a module that does what you want...

The workaround would be to create a dummy product and put it on the empty categories...

The hard way would be messing with the search´s module code, witch will not bem easy if you don´t know how the code is structured!

Best Rergards

Link to comment
Share on other sites

10 hours ago, PCQUATRO said:

Why would somebody want to search for something that doesn´t exist!?

Thank you for your reply. Maybe you did not understand exactly what i meant. Here is another illustration from a large website. It makes it way more clear for the customer to see what the options are when other options are deselected. Now if you land on a category page from a search engine for example you can not see what your options are without navigating to the main category.

Empty filter.jpg

Edited by denkbeter (see edit history)
Link to comment
Share on other sites

It looks like the thing you want on your site was a BUG fixed on the faceted search module -> https://github.com/PrestaShop/PrestaShop/issues/9732

If you need that behavior in your site you have those options i mentioned before...

14 hours ago, PCQUATRO said:

The easy way would be to look for a module that does what you want...

The workaround would be to create a dummy product and put it on the empty categories...

The hard way would be messing with the search´s module code, witch will not bem easy if you don´t know how the code is structured!

Those filters are rendered by the file /modules/ps_facetedsearch/src/product/searchprovider.php. You could try to work with the code there, but that´s not an easy task...

Best Regards

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...