Filters - how to filter on a phrase?

  • Posts: 256
  • Thank you received: 21
11 years 8 months ago #93039

I'm trying to create a "search" module based of a product filter. Where I am getting stuck is the vaguenes of the text filter which when entering a phrase like "maths games" returns all products containing the word Maths plus all products containing the word Games. I want to return exact matches only ie. products with "Maths" & "Games".

What is the best way to do this?

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

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
11 years 8 months ago #93158

That will require a hack of the filtering system as there is no option for that.

You need to change the line:
$terms = explode(' ',$infoGet[0]);

to:
$terms = array($infoGet[0]);

in the file administrator/components/com_hikashop/classes/filter.php so that the filtering system only match with the exact term entered.

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #107630

We just included a feature to handle this possibility.
It will be available in the next version.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum