Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - PureMart (SKU# FLEX-00010)

TOPIC: [SOLVED] Other Search Box Gives 404 Errors

[SOLVED] Other Search Box Gives 404 Errors 11 years 6 months ago #777

The Pure Mart search box works and uses this for one of my searches: index.php?keyword=gb441&limitstart=0&option=com_virtuemart&view=category

The other (unwanted search box, the VM search box) produces 404 errors Category Not Found and for the same search uses: index.php?keyword=gb441&search=true&view=category.

1) How can I eliminate the second VM search box, or
2) Why are they using a different URL for the same search and how to fix it
Attachments:
Last Edit: 11 years 6 months ago by Support.
The topic has been locked.

One Search Box Works - Other One Gives 404 Errors 11 years 6 months ago #784

Hi,

The second one is the one that comes with Virtuemart originally, if it doesn't work, it must be SEF URL issue.
I don't know, actually it has nothing to do with our VM Template as well since it comes with original Virtuemart.

You can remove that search box from there though;
To remove it, open this PHP file:

ROOT/templates/<yourjoomlatemplate>/html/com_virtuemart/category/default.php
(default.php, flexv2.php, defaultlist.php or what ever you are using)

Then Look at these lines:
<form action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&limitstart=0&virtuemart_category_id='.$this->category->virtuemart_category_id ); ?>" method="get">
 
		    <!--BEGIN Search Box --><div class="virtuemart_search">
		    <?php echo $this->searchcustom ?>
		    <br />
		    <?php echo $this->searchcustomvalues ?>
		    <input name="keyword" class="inputbox" type="text" size="20" value="<?php echo $this->keyword ?>" />
		    <input type="submit" value="<?php echo JText::_('COM_VIRTUEMART_SEARCH') ?>" class="button" onclick="this.form.keyword.focus();"/>
		    </div>
				    <input type="hidden" name="search" value="true" />
				    <input type="hidden" name="view" value="category" />
 
		    </form>


You can eliminate this search field and submit info by deleting these lines:
<input name="keyword" class="inputbox" type="text" size="20" value="<?php echo $this->keyword ?>" />
 <input type="submit" value="<?php echo JText::_('COM_VIRTUEMART_SEARCH') ?>" class="button" onclick="this.form.keyword.focus();"/>

I also noticed one more issue in the screenshot, you might want to fix it too, The search box expands too much, you should reduced its width size (after the box is "focused")
For this purpose, open this CSS file:
ROOTtemplates/<yourjoomlatemplate>/html/com_virtuemart/assets/css/flexibleVM2Global.css

And find this CSS Rule:
.FlexibleInputbox:focus {
	width:200px;
	color:#888;
	border:none;
}
and reduce the width size little bit, lets say, make it 100px or 150px.

Cheers.
Flexible Support Desk.
The topic has been locked.

One Search Box Works - Other One Gives 404 Errors 11 years 6 months ago #837

One must read carefully: "(default.php, flexv2.php, defaultlist.php or what ever you are using)"

and thank you for the CSS modification. Looks much better.
The topic has been locked.

One Search Box Works - Other One Gives 404 Errors 11 years 6 months ago #857

your welcome.

Yes, that's correct, the edit must be done to which category browse page you are using, There are 6 different category browse page layouts and you are using only one of them.

IF you want to make the edit to all category browse PHP file, you are welcome to do it ;) but you would just waste your time.

Case closed, topic is locked.
The topic has been locked.
Time to create page: 0.127 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo