- Posts: 259
- Thank you received: 22
Filters - how to filter on a phrase?
- rodfarrell
-
Topic Author
- Offline
Less
More
13 years 8 months ago #93039
by rodfarrell
Filters - how to filter on a phrase? was created by rodfarrell
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?
What is the best way to do this?
Please Log in or Create an account to join the conversation.
13 years 8 months ago #93158
by nicolas
Replied by nicolas on topic Filters - how to filter on a phrase?
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.
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.
13 years 5 months ago #107630
by Eliot
Replied by Eliot on topic Filters - how to filter on a phrase?
We just included a feature to handle this possibility.
It will be available in the next version.
It will be available in the next version.
Please Log in or Create an account to join the conversation.
Time to create page: 0.048 seconds