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
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" ?
Anyone who has a solution?
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?
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
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
it´s an security risk or not............
Everybody knows the answer?
Greetz Ray :o
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.
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", ' ,-');
None of the fixes above have worked for me.
Are there plans for this to be fixed via a release rather than hacking?
good solution for broken search in wirtuemart 2 https://forum.virtuemart.net/index.php?topic=102965.0 (https://forum.virtuemart.net/index.php?topic=102965.0)