News:

Support the VirtueMart project and become a member

Main Menu

Search for an entire word instead part of it

Started by eclipsada, December 14, 2017, 18:01:46 PM

Previous topic - Next topic

eclipsada

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.


balai

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