News:

Looking for documentation? Take a look on our wiki

Main Menu

change search query

Started by sgs, May 12, 2015, 16:17:38 PM

Previous topic - Next topic

sgs

Hi! I'm using virtuemart 3.0.8.
I would like to know where is the file where I can change the query of search module.
Do you know what is / are the file/files?

Thank you!

PRO

what are you trying to do?

sgs

I've a category that i've called "Motors". In this category i've a product that i've called "motore volvo".

Now: if i search with "motore volvo" , I found it. But if i wrote "volvo motore" i don't find it. I would like that the search query would be with "like" and not equal...

Hope that i'm clear  :D

GJC Web Design

the queries are in the admin->models-> product.php
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

sgs

Thanks for the reply..
But what is the query that virtuemart executes with the search module?

GJC Web Design

can't remember the exact function name but it is very obvious in that file - + extremely complex
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

balai

The query is generated in the file: administrator/components/com_virtuemart/models/product.php
function sortSearchListQuery

Btw. This functionality exists in the Custom Filters PRO extension, if want to use a 3rd party for search
https://breakdesigns.net/extensions/custom-filters