Since my first VM 2.0.0 installation on Joomla! 2.5.x, VirtueMart Product Search Module has never worked.
If i do a search, it always answers me "no results found".
is it my fault? Have I configured something wrong?
Now i have VM 2.0.4 (with AIO 2.0.4) but the problem is still here.
Is it maybe related to the Joomla Search Plugin?
Have I to disable or enable something specific?
I have enabled all plugins related new joomla 2.5.4 search engine... but VirtueMart Product Search does not work if i have them turned off.
You will probably find an answer for your problem here:
http://forum.virtuemart.net/index.php?topic=95913.msg315126#msg315126 (http://forum.virtuemart.net/index.php?topic=95913.msg315126#msg315126)
Quote from: jjk on April 11, 2012, 11:38:55 AM
You will probably find an answer for your problem here:
http://forum.virtuemart.net/index.php?topic=95913.msg315126#msg315126 (http://forum.virtuemart.net/index.php?topic=95913.msg315126#msg315126)
VM search plugin is enabled (plugin don't need positioning -_-')
VM search module is enabled and well positioned in my template
Joomla Search module and Search Engine are ok when i want to use them.
I have not the problem of search result "under" the categories...
I also have a problem with virtuemart search.
There is a product called: Heidelberg GTO52+ and when you search for Heidelberg nothing is shown.
But when you search for GTO it does show up. What is the problem and how can it be fixed?!
Thank you for any replies
Hi,
DIfferent solution helpin most of time
-Try to add a Menu link in joomla main page.
-Deactive the SEF for you tests.
-look if the searched product have a category.
- look if you don't have select the category filter in the search module.
-look in BE config from vm2 if you have selected the right search fields(product name, short desc ..)
-renew config by file.
- Write here if all of this not work ;)
Quote from: Electrocity on April 11, 2012, 18:59:46 PM
-Try to add a Menu link in joomla main page.
Menu link... to? I have manually created a menu link (with a proper tree) for all categories.
Quote
-Deactive the SEF for you tests.
Nothing change
Quote-look if the searched product have a category.
All of my products are in a categery
Quote- look if you don't have select the category filter in the search module.
Nothing change
Quote-look in BE config from vm2 if you have selected the right search fields(product name, short desc ..)
All selected or none selected... or some selected, nothing change
Quote-renew config by file.
renew config file? umh... is it about to reset to default settings? It is a production site!
Quote- Write here if all of this not work ;)
I have uninstalled and then reinstalled AIO 2.0.4... nothing change!
This may solve your problem. Ajax live search results, as the customer types in keywords. It works much better than the VM product search, which as you stated does not work.
It costs $15, but I got it to work seamlessly on my site. (VM 2.0.2, JM 2.5.4).
I am not affiliated with the product in anyway, just a happy customer.
http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/virtuemart-products-search/17787
Quote from: ariplatinum on April 12, 2012, 08:12:13 AM
This may solve your problem. Ajax live search results, as the customer types in keywords. It works much better than the VM product search, which as you stated does not work.
Thanks for the info, but i want that this module work correctly!
I see this error with Joomla Debug ON (i have searched the word "brioso" with the module!)
JDatabaseMySQL::query: 1064 -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the
right syntax to use near 'published`="1" AND (s.`virtuemart_shoppergroup_id`= "1" OR (s.`virtuemart_shopp' at line 4 SQL=SELECT SQL_CALC_FOUND_ROWS * FROM `j17_virtuemart_products_it_it` as l JOIN `j17_virtuemart_products` AS p using (`virtuemart_product_id`) LEFT JOIN `j17_virtuemart_product_categories` ON p.`virtuemart_product_id` = `j17_virtuemart_product_categories`.`virtuemart_product_id` LEFT JOIN `j17_virtuemart_categories_it_it` as c ON c.`virtuemart_category_id` = `j17_virtuemart_product_categories`.`virtuemart_category_id` LEFT JOIN `j17_virtuemart_product_manufacturers` ON p.`virtuemart_product_id` = `j17_virtuemart_product_manufacturers`.`virtuemart_product_id` LEFT JOIN `j17_virtuemart_manufacturers_it_it` as m ON m.`virtuemart_manufacturer_id` = `j17_virtuemart_product_manufacturers`.`virtuemart_manufacturer_id` LEFT JOIN `j17_virtuemart_product_shoppergroups` ON p.`virtuemart_product_id` = `j17_virtuemart_product_shoppergroups`.`virtuemart_product_id` LEFT OUTER JOIN `j17_virtuemart_shoppergroups` as s ON s.`virtuemart_shoppergroup_id` = `j17_virtuemart_product_shoppergroups`.`virtuemart_shoppergroup_id` WHERE (`product_name` LIKE "%brioso%" OR `product_sku` LIKE "%brioso%" OR `product_s_desc` LIKE "%brioso%" OR `product_desc` LIKE "%brioso%" OR `category_name` LIKE "%brioso%" OR `category_description` LIKE "%brioso%" OR `mf_name` LIKE "%brioso%"
OR `p`.`virtuemart_product_id`` LIKE "%brioso%" AND p.`published`="1" AND (s.`virtuemart_shoppergroup_id`= "1" OR (s.`virtuemart_shoppergroup_id`) IS NULL )) group by p.`virtuemart_product_id` ORDER BY product_sku ASC LIMIT 0, 30
In red you see OR `p`.`virtuemart_product_id`` ... i'm wrong or i see too much single quotation marks?
And OR (s.`virtuemart_shopp'... i think it is truncated...
Here the call stack with the lines where the error occured
# Function Location
1 JSite->dispatch() JROOT/index.php:42
2 JComponentHelper::renderComponent() JROOT/includes/application.php:198
3 JComponentHelper::executeComponent() JROOT/libraries/joomla/application/component/helper.php:357
4 require_once() JROOT/libraries/joomla/application/component/helper.php:388
5 JController->execute() JROOT/components/com_virtuemart/virtuemart.php:103
6 VirtueMartControllerCategory->display() JROOT/libraries/joomla/application/component/controller.php:754
7 VirtuemartViewCategory->display() JROOT/components/com_virtuemart/controllers/category.php:56
8 VirtueMartModelProduct->getProductsInCategory() JROOT/components/com_virtuemart/views/category/view.html.php:138
9 VirtueMartModelProduct->sortSearchListQuery() JROOT/administrator/components/com_virtuemart/models/product.php:779
10 VmModel->exeSortSearchListQuery() JROOT/administrator/components/com_virtuemart/models/product.php:419
11 JDatabase->loadResultArray() JROOT/administrator/components/com_virtuemart/helpers/vmmodel.php:366
12 JDatabase->loadColumn() JROOT/libraries/joomla/database/database.php:1800
13 JDatabaseMySQL->query() JROOT/libraries/joomla/database/database.php:936
14 JError::raiseError() JROOT/libraries/joomla/database/database/mysql.php:542
15 JError::raise() JROOT/libraries/joomla/error/error.php:251
Coulb be a part of the error?
Quote from: teobgeno on April 12, 2012, 12:35:54 PM
I tested the query you provide at your post and you are correct too much single quotation marks
at administrator/components/com_virtuemart/models/product.php
search for
$filter_search[] = '`'.$searchField.'` LIKE '.$keyword;
modify it to
$filter_search[] = '`'.$searchField.' LIKE '.$keyword;
and make a test see if it is ok . Be cautious because there maybe conflicts elesewhere if it finally works.
I have edited the code but the search still not work :-(
You can try the search here (http://goo.gl/4wplb)
(is in the bottom of the left column)
The strange thing on this is that the query i echoed in my local site does not include the OR `p`.`virtuemart_product_id`` LIKE "%keyword%"
I wonder why you have this output .Did you make any modifications to administrator/components/com_virtuemart/models/product.php ?
Try this and tell me if it is ok
search at administrator/components/com_virtuemart/models/product.php
for
$filter_search[] = '`'.$searchField.'` LIKE '.$keyword;
and replace with
if($searchField!='virtuemart_product_id')
{
$filter_search[] = '`'.$searchField.'` LIKE '.$keyword;
}
If it is ok replace it back to its previous state . That is not the root of your problem something sending virtuemart_product_id as searchfield when it should not.
I found the error, but I suggest not to make the search available for the product_ids
sry to say teo, your fix works only for one case imho, the error was one line above
$searchField = 'p`.`'.substr($searchField, 2, (strlen($searchField))) ;
Miss for 1 line . I was too close :D
Nice work Milbo .
Quote from: Milbo on April 12, 2012, 13:38:35 PM
I found the error, but I suggest not to make the search available for the product_ids
sry to say teo, your fix works only for one case imho, the error was one line above
$searchField = 'p`.`'.substr($searchField, 2, (strlen($searchField))) ;
YEAHHHHHHH!!! It works!
Thanks Milbo... and thank to you too teobgeno!!!
In VM 1 the search worked like this:
Lets' say we have a product named : "My best red product"
If you searched for "best product" you had 1 result the "My best red product"
In VM 2 if you make the same search "best product" you come up with No results. I tried "best + product" I tried "best AND product" but no luck at all. Is there any solution to this?
== EDIT ==
The search plugin works fine (like VM1)
The search module doesnt
Hi all , thanks to raise the issue.
Thanks, Milbo !! once i disable the search for product_ids, it works very well now !!
The search plugin is a hook for the joomla plugin, while the module is pure vm.
Searches are an own field, like google proofes us every day.
I'd say that the answer is quite simple,
if you disable SEO then search module will work under all categories, but if you enable SEO search module will search the keyword in that particular category.
What I did to quick fix the problem was to add in <form> a new <input>
<input type="hidden" value="0" name="virtuemart_category_id">
and the other thing about "+" and "-" in product names..
you go to administrator/com_virtuemart/models/product.php
and around line 129 find
$this->keyword = vmRequest::uword ('keyword', "0", ' ');
and replace it with
$this->keyword = vmRequest::uword ('keyword', "0", ' ,-,+');
last parameter of uword is allowed characters
i found solution for broken search here https://forum.virtuemart.net/index.php?topic=102965.0 (https://forum.virtuemart.net/index.php?topic=102965.0)
None of these tips helped. The search is still broken on 2.0.10.
The problem for me was in the Joomla SEO - friendly addresses, not VM SEO. If this option is turned off everything with search is ok.
Added: The hack of ngoagr works fine /Joomla 2.5.7, VM 2.0.12b/, he missed to mention that hidden input is in the form in /modules/mod_virtuemart_search/tmpl/default.php and in the form in /components/com_virtuemart/views/category/tmpl/default.php . Works fine for me.
thnak you, it works (but how can this be possible after one year of VM 2.0 ? ?? :o)
Both fixes are now added to the next 2.0.16 and 2.1
The search was not "broken" that is a bit too harsh word. Better said our security was too strict and not commode like google
Hi all,
I tried to copy the default.php under mod_virtuemart_search and category from VM2.0.16 to the corresponding override directories for VM2.0.14 but still I can't get all search results showing up when searching from inside a category. I only get the results from inside the open category.
I also tried to add the hidden fields in both these files as mentioned by ngoagr without any better result.
Can someone please tell how I should get Joomla SEO, VM SEO and the search to work as expected? Maybe it's clear from the previous post but I can't get it to work.
--------------------
Update
Took the risk and upgraded to 2.0.16 and it still only searches inside the opened category, not all categories. It doesn't matter if I check the "Category filter" in search module or not. Milbo, I thought you added the fix into 2.0.16 or did I misunderstand something?
-------------------
Thanks
Patrick
Hi Patrick- did you end up getting a response? My search is also not working with SEO enabled and i am now on vm 2.0.18a...
thanks