News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Virtuemart 2 search doesnt work.

Started by rippergr, April 24, 2012, 10:11:26 AM

Previous topic - Next topic

rippergr

Hello all
I have a problem with virtuemart 2 search. When I search something it doesnt return any results even if I put the exact product name it just shows the categories. Only if I put the first word for example digi it gives me results. The website is http://comworldv2.comworld.gr .
Thanks in advance.

Joomla 2.5.2
Virtuemart 2.0.6

Visit my webpage www.comworld.gr

plastique

I have also same issues with VM Search.
I can't understand why in search results shows on the top of the page the "Top level Categories" ?
Joomla 2.5.4
Virtuemart 2.0.6

rippergr

Visit my webpage www.comworld.gr

rippergr

I think I am starting to realise what is the real problem. Today I was searching a product in virtuemart administrator and I had the same problem. Then I found that if I write only the number from a product for example 100 it shows all products that have this number but if I put a letter it doesnt return anything. So I am quessing that it has something to do with the languages.
Can someone give me a tip or a solution?
Visit my webpage www.comworld.gr

rippergr

The problem is that virtuemart 2 doesnt allow special characters like -,.#$ etc for searching. I found this article as bug  http://forum.virtuemart.net/index.php?topic=97815.0 but I don't see any solution or change in virtuemart search.
The only solution I found is here http://forum.virtuemart.net/index.php?topic=98524.msg332819#msg332819
Visit my webpage www.comworld.gr

rippergr

I found a solution for this problem. I changed the file config.php in /administrator/components/com_virtuemart/helpers/
in line 812


return mb_ereg_replace('[^\w'.preg_quote($custom).']', '', $source);

to

return mb_ereg_replace('/[^\w'.preg_quote($custom).']/', '', $source);

The problem is that virtuemart search filter all special characters and returns no results.
With this tweak it working great.
I don't know if there is any problem with security issues. Use it with your own responsibility
Visit my webpage www.comworld.gr

552288

it´s an security risk or not............
Everybody knows the answer?

Greetz Ray  :o

rippergr

I don't think that is security issue if virtuemart let "-" for searching
I agree that characters like ><&% are dangerous but I don't remember "-" character can open a hole in security.
Visit my webpage www.comworld.gr

Sirinidis Nikolaos

you don't have to change anything in config.php
just open administrator/com_virtuemat/models/products.php
and find around line 129

$this->keyword = vmRequest::uword ('keyword', "0", ' ');

the last parameter of uword is allowed characters when filtering keyword, now it has the space character you just add "-" character


$this->keyword = vmRequest::uword ('keyword', "0", ' ,-');
κατασκευή ιστοσελίδων http://www.netikon.gr

Ean

None of the fixes above have worked for me.

Are there plans for this to be fixed via a release rather than hacking?