News:

Support the VirtueMart project and become a member

Main Menu

Search module not working

Started by Xaman, July 17, 2012, 17:57:57 PM

Previous topic - Next topic

jillymot

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.

CenturionSigns

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?

freshqa

Hello everyone!

Someone managed to get search working for all products not only inside category?

alepoudaki

I need this option too! I have read all forums but still nothing.

jillymot

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.


s123k

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)



dsherwin

#21
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

bose.kaspathy@gmail.com

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!

guidocx842

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!

s123k

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?

guidocx842

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.

s123k

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">

guidocx842

YEAH!
Thank you very much! Now it works!!!!
Thanks a lot! Have a nice day!  ;)

Doggiefield

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?
Point of sale for Virtuemart
https://www.posforwebshops.com

Dreeg

#29
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?