Author Topic: Category search filter in vm search module doesn't work  (Read 8642 times)

manuelgonzalez

  • Beginner
  • *
  • Posts: 3
Category search filter in vm search module doesn't work
« on: April 23, 2012, 12:03:53 pm »
I active the option "category search filter" (or something like that, i've vm in spanish, but search is in all products in shop, not only in current category. How can i fix then? I try to fix directly in vmsearch plugin but it seems that doesn't use it :S

Vm plugin search is activated and i've 2 vm search modules, one for global search and another inside the category.

lopezalejandro

  • Beginner
  • *
  • Posts: 7
Re: Category search filter in vm search module doesn't work
« Reply #1 on: April 29, 2012, 13:12:47 pm »
Hi!
The problem is a little error on mysql querry composition.
in the file administrator/components/com_virtuemart/models/product.php in line 226
replace:
$where[] = implode(' OR ', $filter_search );
for:
$where[] = "(".implode(' OR ', $filter_search ).")";

bye, see you on monday at the office!

Alejandro López
Grupo Odín Soluciones Informáticas
http://grupoodin.es

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Category search filter in vm search module doesn't work
« Reply #2 on: May 03, 2012, 11:17:22 am »
added, thanks.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

PabloArias

  • Beginner
  • *
  • Posts: 16
    • Pablo Arias
Re: Category search filter in vm search module doesn't work
« Reply #3 on: February 04, 2013, 15:56:25 pm »
I have the opposite problem. When I disable the option "Search Filter Category" in module configuration, it continues filtering when you search being in a category or a product view.

I use Joomla 2.5.8, Virtuemart 2.0.18a and PHP 5.3.8. Tested too in PHP 5.3.6-13ubuntu3.2.

Thanks and regards!

alepoudaki

  • Beginner
  • *
  • Posts: 20
Re: Category search filter in vm search module doesn't work
« Reply #4 on: February 06, 2013, 09:23:09 am »
I found that in order to work category search filter inside the Virtuemart Search Product module, in Global Configuration(Site tab) the Search Engine Friendly URLs must be enabled... I don't know if this is a bug.

PabloArias

  • Beginner
  • *
  • Posts: 16
    • Pablo Arias
Re: Category search filter in vm search module doesn't work
« Reply #5 on: February 06, 2013, 12:54:41 pm »
I have already Friendly URLs enabled.

simplestudio

  • Beginner
  • *
  • Posts: 3
Re: Category search filter in vm search module doesn't work
« Reply #6 on: April 08, 2013, 16:08:04 pm »
If the Search Engine Friendly URLs is enabled and "Search Filter Category" is disabled and the results continue to be filtered, then may by that will work for you:

Disable the Search Engine Friendly URLs in Global Configuration and then Enable it again
1. - Turn OFF the "Search Engine Friendly URLs" (in global configuration)
2. - Save settings
3. - and then turn them ON again
4. - Safe the settings again

It works for me.

Regards.

j0wnathan

  • Beginner
  • *
  • Posts: 5
Re: Category search filter in vm search module doesn't work
« Reply #7 on: April 08, 2013, 17:43:04 pm »
If the Search Engine Friendly URLs is enabled and "Search Filter Category" is disabled and the results continue to be filtered, then may by that will work for you:

Disable the Search Engine Friendly URLs in Global Configuration and then Enable it again
1. - Turn OFF the "Search Engine Friendly URLs" (in global configuration)
2. - Save settings
3. - and then turn them ON again
4. - Safe the settings again

It works for me.

Regards.

Wow, it worked. Thanks! :)

PabloArias

  • Beginner
  • *
  • Posts: 16
    • Pablo Arias
Re: Category search filter in vm search module doesn't work
« Reply #8 on: April 09, 2013, 09:54:03 am »
It doesn't work for me.  :(

Thank you

simplestudio

  • Beginner
  • *
  • Posts: 3
Re: Category search filter in vm search module doesn't work
« Reply #9 on: April 09, 2013, 11:57:06 am »
It doesn't work for me.  :(

Thank you

Now fight with another problem.
Filtering works despite being OFF when the mainmenu contains a item with link to virtuemart category. When you remove that menu item from mainmenu, the search works correctly. When you put it again - the search begins to filter.

Anybody have a solution to this problem?
So far, it took me two weeks time and still no solution.

In my case the problem comes from the fact that I have the same product in two different categories. Once the product is a member of the category of the category "Models" (each model has a folder with the name of the model, which is the name of the model itself) and once a member of the category "Male" or "Female" respectively.
Hence, when I click on a model roads are confused, Tuck and accordingly there are two possible routes to the product, which is superimposed on the link.

simplestudio

  • Beginner
  • *
  • Posts: 3
Re: Category search filter in vm search module doesn't work
« Reply #10 on: April 16, 2013, 12:53:25 pm »
Hi!
I found another little error on mysql querry composition.
in the file plugins/search/virtuemart/virtuemart.php in line 155

replace:
. ' WHERE ' . $where . ' AND p.published=1 '

with:
. ' WHERE (' . $where . ') AND p.published=1 '


All the "where" phrases must be enclosed in parentheses. Otherwise, all instructions after them are not running (ie everything from "AND" and bellow).

Regards,
Konstantin


csho

  • Beginner
  • *
  • Posts: 33
Re: Category search filter in vm search module doesn't work
« Reply #12 on: May 19, 2014, 13:31:04 pm »
If the Search Engine Friendly URLs is enabled and "Search Filter Category" is disabled and the results continue to be filtered, then may by that will work for you:

Disable the Search Engine Friendly URLs in Global Configuration and then Enable it again
1. - Turn OFF the "Search Engine Friendly URLs" (in global configuration)
2. - Save settings
3. - and then turn them ON again
4. - Safe the settings again

It works for me.

Regards.

*Bangs head repeatedly* Huge thanks, I so frustrated with all those silly bugs lately...