Jump to content

FacetedSearch 3.x renderFacets override


MikelMR

Recommended Posts

Hi,

I would like to know what is the best place to override the behaviour of the renderFacets with the new FacetedSearch module (Tried 3.1.0 and 3.2.0).

With the 2.0.3 version I have overridden the ProductListingFrontController->renderFacets, but with the new version it seems that there is no call to that method and it's done in the facetedsearch module, SearchProvider->renderFacets.

What I'm doing is to group some facets, so I need to access to the facetCollection before the module renders it and I would prefer not to modify the Prestashop Core or the facetedsearch module.

The closest hooks I have found were after the render call, hookFilterProductSearch and hookActionProductSearchAfter, so I can't use them.

I have managed to do it by modifying the ProductSearchResult, but I have read that as that class has a namespace it can't be overridden, moreover, I have read that you have to avoid to override classes and this is going to be deprecated.

Any idea/suggestion on how can I do it properly?

Regards,

Edited by MikelMR
The module has a new version (see edit history)
  • Like 1
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...