Hi,
I can't seem to make the search module for VirtueMart to work. When I search for something it always gives an empty result and shows only the categories. I'm using the latest Joomla (2.5.6) and VirtueMart (2.0.8c).
Can anyone assist me with this?
Hi Xaman,
There's not really much information to go by in order to help you?
Have to checked that the "VM - Search, Virtuemart Product" plugin is set to published in the > Extensions > Plugin Manager?
Let's start with that. The fact that the search is displaying the results page without errors means the search function is in fact working.
There's not much I can tell you, everything works fine EXCEPT the search. And it was giving some errors before, but I updated it to the latest version and now gives no errors, but no results either.
I searched for that plugin and it's active.
virtuemart search doesn't work with dashes or spaces. You can try just inputting one section of your search input. Maybe the most unique part of your code. ie: i believe would be 234 and see if it works. solved mine like this. Hopefully, someone can offer a solution to improve the search plugin be it by coding or providing a new plugin.
Hello,
Same problem, VM product search doesn't work on my site. So I've bought a commercial extension. That is working in Ajax mode but it's not working when I'd like to list the results in a new page. Support said that is because of the VM search modul failure.
So I would be happy if anybody can help us to solve the standard VM search modul failure.
I've checked, standard VM search plugin is enabled.
Joomla 2.5.6, VM2.0.10
Bye!
I have noticed that the Virtuemart Search Product module works when inputting the search while on a non-virtuemart page, i.e. on a Joomla article page. I input the search words and it produces the expected result, returning results from multiple categories if the criteria is met. If, however, I am on a virtuemart category layout page, the expected result will only be returned if I am on the category layout page that product is in, i.e. the product search filters only on that category. If I try the same search while I am on another category page, it will return a 0 result. This occurs whether Search Filter Category setting in the module (whatever that is supposed to mean) is set to Yes or No - it makes no difference.
Would be great to be able to fix this, as the Virtuemart Search Product results look better than using the standard Joomla search module.
I have found, contrary to a previous post, that you can have spaces in the search term, but it only works within the confines of what I have outlined above.
Hope someone can help ;)
Joomla 2.5.8 Virtuemart 2.0.12b
Anyone able to help with this?
I'd like help with this issue too. When I type in anything in the search it just takes me to the categories page.
@CenturionSigns
Your search problem sounds different compared to the previous posts. Please submit some more information like VM version, your search module settings, etc.
Hi, I'm running Joomla! 2.5.2, Virtuemart 2.0.14 and the ShoppingBag theme from Shape5. The search module is in a sidebar position. The module is "VirtueMart Search Product". Search filter category is set to "no". Not sure what else I can tell you?
When I enter a search term in the module from the home page and click return I get taken directly to the page with all of the categories listed.
When I enter a search term in the module while on any other page I get mixed results: sometimes it will pull up the blank results page, other times it will find the items it should and return them.
http://www.centurionsafetysigns.co.uk
Looks like it currently is coded the way that the search module finds all products when initiated from the 'categories' view and automatically limits the search to the current category if you initiate it from a single category view.
Yes jjk, that is what I was trying to explain. But I am sure it has not always been this way. I originally designed my client's site back in 2008 and the product search would return results from all categories regardless of which category happened to be open at the time. How can you make it operate this way again?
I initially thought the Search Filter Category setting in the module would control this, but I have tried setting to both Yes and No with the same result.
Apparently in VM2 it has been coded the way it currently works and developers are discussing whether or not it should be changed.
On my own site I'm also using the Joomla search plugins including the 'VM - Search, Virtuemart Product' plugin, which displays 'advanced search' (Google type) search results from all categories.
@jjk you mean additional Joomla extensions for searching VM products?
Quote from: CenturionSigns on January 18, 2013, 17:53:39 PM
@jjk you mean additional Joomla extensions for searching VM products?
No, it is a plugin which is part of the VM2 core. If you go to your Joomla 2.5+ Plugin Manager and set the filter to "Search", you will see a 'VM - Search, Virtuemart Product' plugin. If you enable this plugin, you can create a Joomla Menu item with the 'Menu Item Type' "Search Form or Search Results". In the frontend this will present a search form/results like in the screenshot below.
[attachment cleanup by admin]
We had already tried the Joomla option using a module, but my client wasn't happy with how the results were displayed - she wants the product images to be displayed as they are for the Virtuemart Product Search results.
Can you please update us if the developers change their mind about this or at least give us the option to choose by fixing the Search Filter Category option in the module?
Many thanks for following up on this.
Thanks! Got this working. Now where would I go to edit the output of that? e.g. restrict search to articles and products, not show the date modified etc?
Hello everyone!
Someone managed to get search working for all products not only inside category?
I need this option too! I have read all forums but still nothing.
Hi jjk
I was hoping you might be able to help with this, since we can't get the Virtuemart search to work as desired.
Are you able to advise how to add the product image to the Joomla search results page?
I assume that I will need to add code to the following file, but as I'm still finding my way with php would appreciate some help.
/public_html/components/com_search/views/search/tmpl/default_results.php
I also assume that this file will be overridden with a Joomla upgrade? Is there a better way to code that would avoid this?
Thanks in advance for any assistance you can provide. I've seen a couple of old queries with regard to this on the forums, but could not find any answers.
Hey, I think i got it working. I had it working before but I think the joomla update messed it up, so I had to try to get it working again.
open the file at \modules\mod_virtuemart_search\tmpl\default.php
change this on line 4. <form action="<?php echo JURI::base('index.php?option=com_virtuemart&view=category&search=true&limitstart=0&virtuemart_category_id='.$category_id ); ?>" method="get">
It should be similar to this, since I changed it before.
to
<form action="<?php echo ('index.php?option=com_virtuemart&view=category&search=true&limitstart=0' ); ?>" method="get">
see if that works. Seems like it works for me. The only thing is that it will keep the your-url.com/'your-category'/index?... in the URL box. when your searching anywhere inside a category page (i.e a product details page)
Here is a better fix,
Change line 4 in modules/mod_virtuemart_search/tmpl/default.php
<form action="<?php echo JRoute::_('index.php'); ?>" method="get">
and the following lines after line 43 before the closing form tag
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="category" />
<input type="hidden" name="search" value="true" />
<input type="hidden" name="limitstart" value="0" />
Also in components/com_virtuemart/views/category/tmpl/default.php on line 155 :
from
<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=category&limitstart=0&virtuemart_category_id=' . $this->category->virtuemart_category_id); ?>" method="get">
to
<form action="<?php echo JRoute::_ ('index.php'); ?>" method="get">
and add the following lines after line 166
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="category" />
<input type="hidden" name="search" value="true" />
<input type="hidden" name="limitstart" value="0" />
It really should be submitted as a patch
Hope this helps
Darragh
Hi,
I also have problems with the search module. I have set up everything as mentioned but the search box is not appearing.
I tried to search everywhere. Similar questions have not been answered, I am losing a lot of time on this.
Can some moderator or one of the guys who belong to the dev group help?
Thanks!
Hi everybody!
For me it's the same!
The search module works only inside category and not for all products!
So, if I search a product that is in another category, the response is No results!
I try the patch submitted by dsherwin but not works for me. Joomla 2.5.9 + Virtuemart 2.0.20b.
Please, does somebody know a solution? I've got Virtuemart Product plugin (type Search) activated but nothing...
Thanks a lot!
Quote from: bose.kaspathy@gmail.com on March 19, 2013, 00:21:07 AM
Hi,
I also have problems with the search module. I have set up everything as mentioned but the search box is not appearing.
I tried to search everywhere. Similar questions have not been answered, I am losing a lot of time on this.
Can some moderator or one of the guys who belong to the dev group help?
Thanks!
Did you put in the virtuemart search module (under extensions > module manager), and put the position in the template?
Quote from: guidocx842 on April 12, 2013, 16:52:48 PM
Hi everybody!
For me it's the same!
The search module works only inside category and not for all products!
So, if I search a product that is in another category, the response is No results!
I try the patch submitted by dsherwin but not works for me. Joomla 2.5.9 + Virtuemart 2.0.20b.
Please, does somebody know a solution? I've got Virtuemart Product plugin (type Search) activated but nothing...
Thanks a lot!
Did you try my patch?
QuoteDid you try my patch?
Yes! I try it for first but nothing... for me does not work :( :( :(
What do you suggest? By now I'm using the Joomla search instead of VM search... but I'll prefer virtuemart one because of the image of the product that in Joomla search I don't see... thanks.
Quote from: guidocx842 on April 12, 2013, 18:46:20 PM
QuoteDid you try my patch?
Yes! I try it for first but nothing... for me does not work :( :( :(
What do you suggest? By now I'm using the Joomla search instead of VM search... but I'll prefer virtuemart one because of the image of the product that in Joomla search I don't see... thanks.
try changing it to this on line 4 in modules/mod_virtuemart_search/tmpl/default.php , keep the other changes made from dsherwin
<form action="<?php echo JURI::base(); ?>" method="get">
YEAH!
Thank you very much! Now it works!!!!
Thanks a lot! Have a nice day! ;)
Hi this is exactly what I'm looking for, so I was glad to have found this topic.
I tried the solution as described dsherwin and the small other fix by s123k, but I can't get it to work.
I'm using
Joomla 2.5.13
Virtuemart 2.0.22a
I use template override (also for mod-virtuemart-search) en I adjusted the files in the template
I don't know what I'm doing wrong, can somebody pleasy help me to fix this?
Hi all, I have the same problem..
Quote from: dsherwin on March 08, 2013, 00:50:25 AM
Here is a better fix,
Change line 4 in modules/mod_virtuemart_search/tmpl/default.php
<form action="<?php echo JRoute::_('index.php'); ?>" method="get">
and the following lines after line 43 before the closing form tag
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="category" />
<input type="hidden" name="search" value="true" />
<input type="hidden" name="limitstart" value="0" />
Also in components/com_virtuemart/views/category/tmpl/default.php on line 155 :
from
<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=category&limitstart=0&virtuemart_category_id=' . $this->category->virtuemart_category_id); ?>" method="get">
to
<form action="<?php echo JRoute::_ ('index.php'); ?>" method="get">
and add the following lines after line 166
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="category" />
<input type="hidden" name="search" value="true" />
<input type="hidden" name="limitstart" value="0" />
It really should be submitted as a patch
Hope this helps
Darragh
On my Joomla 2.5.14 and VM 2.0.22b default file:
Line 4 in modules/mod_virtuemart_search/tmpl/default.php
<form action="<?php echo JURI::base(); ?>" method="get">
And if I replace with
<form action="<?php echo JRoute::_('index.php'); ?>" method="get">
This have no effect.
My lines after the 42nd:
<input type="hidden" name="limitstart" value="0" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="view" value="category" />
Also in components/com_virtuemart/views/category/tmpl/default.php on line 156 :
from
<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=category&limitstart=0&virtuemart_category_id=', FALSE); ?>" method="get">
to
<form action="<?php echo JRoute::_ ('index.php'); ?>" method="get">
As before, has no effect..
How I can fix this problem?
Nothing? :(
I have also the same problem. I use latest vm 2.026d and joomla 2.5.19. Has anybody fixed this issue yet?
Have this problem too. Any ideas?
UPD: Ok, i think i solved this problem. Virtuemart keeps last visited category in current user session by cookies. You can test it removing site cookies :)
To disable this behavior you should disable adding this category to session. Open /components/com_virtuemart/helpers/shopfunctionsf.php file and search for function getLastVisitedCategoryId.
Comment default return and make it like this:
static public function getLastVisitedCategoryId ($default = 0) {
$session = JFactory::getSession();
//return $session->get( 'vmlastvisitedcategoryid', $default, 'vm' );
return $default;
}
I hope this will help you.
Hi ,
the following change in search module view file modules/mod_virtuemart_search/tmpl/default.php works fine for me ( but it is better to create a template override )
replace line 4
<form action="<?php echo JRoute::_ ('index.php?option=com_virtuemart&view=category&limitstart=0', FALSE); ?>" method="get">
and add the following at the end of the file after the other input elements
<input type="hidden" name="virtuemart_category_id" value="0"/>
Quote from: jjk on January 18, 2013, 19:29:42 PM
Quote from: CenturionSigns on January 18, 2013, 17:53:39 PM
@jjk you mean additional Joomla extensions for searching VM products?
No, it is a plugin which is part of the VM2 core. If you go to your Joomla 2.5+ Plugin Manager and set the filter to "Search", you will see a 'VM - Search, Virtuemart Product' plugin. If you enable this plugin, you can create a Joomla Menu item with the 'Menu Item Type' "Search Form or Search Results". In the frontend this will present a search form/results like in the screenshot below.
I have the 2.6 virtuemart and I can't find this in plugins,does it still exist?
I need to fix the issue that when searching when viewing a products pages it searches only within that category and not from root, as a result to show no result page.
Hello, Bolonia and Yourgeek! Just after I've been thinking how to send you a bottle of decent whiskey I tested your solutions. Sadly not to have any success. So no whiskey for you :(
I'm using newest j!2.5 and newest stable VM and hoping someone will help to solve this issue.
Enabling SEF solved the problem for me.
I had the same problem in VM3 and had to enable the "VirtueMart Product" plugin
I have a few plugins that I wrote that use the com_finder extension. Maybe this would be helpful? Its not perfect!
http://webdesign.trevorbice.com/free-downloads/smart-search-virtuemart-product.html
I had issues displaying search results also in vm 3.0.14 even.
So after testing I noticed in my menu item for vm categories I had page layout set to "categories" and that displays 0 results after searching for a term.
If you change the page layout to "default" or "no override" in your menu item in our case it worked and shows the results.