Check search filter input before applying filter

  • Posts: 200
  • Thank you received: 75
8 years 1 month ago #251594

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.2

Hi,

we have a text search filter and notice that some spelling mistakes are frequently made by users, resulting in the filter not finding any results - and the user most often leaving.

We were wondering if it's possible to make our search filter a little bit "smarter" by adding some code to check the filter input, and correct it if necessary, before the filter is being applied. Would this be possible?

We had a look at the "filter" view but so far we haven't been able to get at the data before the results are displayed. Any guidance or help would be great, thanks!

Kind regards,

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 1 month ago #251643

Hi,

You could create a custom Joomla plugin of the group "system" and implement the "onAfterRoute" trigger of Joomla.
This trigger is called just after Joomla set the parameters in $_GET based on the SEF URLs, before HikaShop or any component is called.
So you could check in your plugin trigger that you have the filter parameter, and if you do, you could update it before the HikaShop filtering system tries to read it.

The following user(s) said Thank You: GW

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum