Jump to content

I can't filter in "Search Page" with ps_facetedsearch module


Oktay

Recommended Posts

Hello friends,

I would like to learn something from you if possible. The "Product Filter" (ps_facetedsearch module) module is running normally on my site. However, I can't filter in "Search Page" with ps_facetedsearch module. I opened the left column in Search Page and added the "Product Filter" module to the corresponding hooks, but could not activate the filter in the search page.This is a very important thing if we think that people are searching for products on the site. How can I activate filtering in Search Page? I'd appreciate it if you could help. (Version : 1.7.3.2)

Thanks.

Product Filter.fw.png

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

  • 8 months later...

Hi,

My personal position is quite simple regarding version 1.7 of PrestaShop, it is mandatory to always have the latest version because, as 1.7 is a transition version in order to integrate the Synfony framework, each update contains hundreds of essential corrections.

So, in your case, the first thing would be to test an update to the latest version 1.7 available on a test installation that would be a carbon copy of your current store.

I know that this is restrictive, but it is the prerequisite for the 1.7 before the 1.7.5.2 that is starting to be really usable in production.

Link to comment
Share on other sites

I have seen the faceted search filters on search page on 1 shop from 1 dev I discussed with.

I dont know exactly how they did, he told me:
- he enabled it on search page
- he modified the search page layout: he told me something like "the search page takes all the place in the page, if you reduce it, the filters will appear on the left"

Not sure what it means

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...

I don't understand why this hasn't been answered.
I've been looking into this and it seems possible if you edit the following line in "/modules/ps_facetedsearch/src/Hook/ProductSearch.php (line #54)" (PrestaShop 1.7.6.5):

if ($query->getIdCategory()) {

And update it to:

if ($query->getIdCategory() || $query->getSearchString()) {

Seems to do the trick of adding the ps_facetedsearch module to the search page.
You need to of course make sure that the ps_facetedsearch module is hooked into the appropriate display hook (displayLeftColumn for me), and that the search page uses your theme template that makes use of the left column.

Still investigating this, unsure if there are better solutions. This seems to be the easiest.

Edited by Estian (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 5 months later...
  • 2 years later...

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...