VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: Yellow Cherry on September 14, 2012, 11:58:40 AM

Title: Zero '0' at the end of VM2 product search input box
Post by: Yellow Cherry on September 14, 2012, 11:58:40 AM
I have a site in development here: http://79.170.40.242/britishcurlingsupplies.co.uk/

Joomla 2.5.6
VM 2.0.10

Using the Product Search module

A random zero '0' appears at the button position although I have told the module not to show a button - settings in screen shot attached

Any ideas on how to get rid of it would be very much appreciated

Thanks

[attachment cleanup by admin]
Title: Re: Zero '0' at the end of VM2 product search input box
Post by: Giannis86 on September 15, 2012, 13:47:44 PM
Same problem here on J2.5.7/V2.0.10

I am not having this on another site which is almost the same but V2.0.6 instead

http://www.stunning-corals.nl/webshop/index.php/webshop
Title: Re: Zero '0' at the end of VM2 product search input box
Post by: jesperkronholm on September 25, 2012, 11:40:19 AM
Hi!

I had the exact same problem and solved it by doing the following in the file /modules/mod_virtuemart_search/tmpl/deaufult.php.
In all the 'cases' (begining on line 16) I added this if statement for "$button" :

if ($button == '0') {
    $output = $output;
}

For example case 'right' was before:

case 'right' :
    $output = $output.$button;
break;

And I changed it to:

case 'right' :
    if ($button == '0') {
        $output = $output;
    }
    else $output = $output.$button;
break;

Now I'm no php expert but this seems to have solved it for me. Maybe somenone else knows WHY $button outputs '0' when your settings says "Search button = NO".
Title: Re: Zero '0' at the end of VM2 product search input box
Post by: Yellow Cherry on September 25, 2012, 11:46:46 AM
Thanks jesperkronholm fixed the issue for me!