- Posts: 200
- Thank you received: 75
Check search filter input before applying filter
10 years 3 days ago #251594
by GW
Check search filter input before applying filter was created by GW
-- 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,
-- 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.
10 years 2 days ago #251643
by nicolas
Replied by nicolas on topic Check search filter input before applying filter
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.
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.191 seconds