VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: eclipsada on December 14, 2017, 18:01:46 PM

Title: Search for an entire word instead part of it
Post by: eclipsada on December 14, 2017, 18:01:46 PM
Hi,
Is there a way to make the search module to search only for a whole word instead of part of it?

Eg. If I search for...

..."Libra" (Libra dog food)
Results: fish food - "contém uma formula equiLIBRAda" ("contains a balanced formula")

"Sumo"
Results: Water feeder - "baixo conSUMO" (low energy consumption)

I get back many results that have nothing to do with the searched term.
It's annoying and confusing for customers.

Thank you.
Title: Re: Search for an entire word instead part of it
Post by: eclipsada on December 29, 2017, 19:10:56 PM
No clues on this yet? :(
Title: Re: Search for an entire word instead part of it
Post by: balai on December 29, 2017, 19:44:10 PM
You have to change the search query in administrator/components/com_virtuemart/models/product.php
check inside the sortSearchListQuery function.

Btw. If you want to use a 3rd  party search which works in more sophisticated way and solves also this, try Custom Filters
https://breakdesigns.net/extensions/custom-filters