VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: csho on August 11, 2014, 10:19:51 AM

Title: VM Product incorrect product results
Post by: csho on August 11, 2014, 10:19:51 AM
I noticed that the vm product search module does a string search within the product, displaying whole or a PART of the searched term that matches with a product.

I am currently using in to search product with some Product ID codes that match the specific product placed in the product description.
From what I understand it works like this:
E.g I search ABCD01
----->Result: Products with ABCD01
IF the isn't a product with that id code it returns products that have that string in them e.g
----->Result: Instead of zero products it returns product with e.g EFGHABCD01

Because "ABCD01" is including the the word.
Is there any way to make this search more "strict" for my needs? I am not concern about Upper or Lower Cases, I am happy with it working regardless I type eg. an A or an a.
Title: Re: VM Product incorrect product results
Post by: GJC Web Design on August 11, 2014, 12:40:58 PM
You would probably have to rewrite some of the queries in the sortSearchListQuery () function in the product model?

they are all LIKE  %[searchterm]% queries