News:

Looking for documentation? Take a look on our wiki

Main Menu

Tweaking the VM Search functions

Started by EvanGR, March 09, 2020, 10:42:00 AM

Previous topic - Next topic

EvanGR

Hello,

We want to do some custom tweaks to the VM Search logic. Which file(s) do we need to look for?

Thanks

GJC Web Design

administrator\components\com_virtuemart\models\product.php

function sortSearchListQuery()

there is a plugin trigger @ line 773

      if ($this->searchplugin !== 0) {
         JPluginHelper::importPlugin('vmcustom');
         $dispatcher = JDispatcher::getInstance();
         $dispatcher->trigger('plgVmBeforeProductSearch', array(&$select, &$joinedTables, &$where, &$groupBy, &$orderBy,&$joinLang));
      }
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

EvanGR

Thank you.

I want to alter the user typed keywords, to catch some common errors or replace search terms.

e.g.
User types: "buble"
Search for: "bubble" or "baloon"

Any idea which part of the function holds the typed in keywords?

Thanks

pinochico

Nice idea :)

If You find solution, pls type here, I need too.

Thanks
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

GJC Web Design

perhaps a multi-server AI installation that knows what you mean even before u do and will return the results just by you thinking of a key word....

hint :  keyword
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

PRO

Quote from: EvanGR on March 09, 2020, 11:24:46 AM
Thank you.

I want to alter the user typed keywords, to catch some common errors or replace search terms.

e.g.
User types: "buble"
Search for: "bubble" or "baloon"

Any idea which part of the function holds the typed in keywords?

Thanks


I would keep the data in a separate table.

Then check keyword in URL and redirect.


Studio 42

Quote from: PRO on March 10, 2020, 16:38:18 PM
Quote from: EvanGR on March 09, 2020, 11:24:46 AM
Thank you.

I want to alter the user typed keywords, to catch some common errors or replace search terms.

e.g.
User types: "buble"
Search for: "bubble" or "baloon"

Any idea which part of the function holds the typed in keywords?

Thanks


I would keep the data in a separate table.

Then check keyword in URL and redirect.


why note using synonym dictionary? But this can be very slow and need to be adjusted by shop, so can be a nightmare and need one per language.
Another option, but for a really big shop, is to check the most searched word combination.But this need to have plenty of search.

EvanGR

URL Redirects may be a much slower option, than simple keyword translation in the search code.