Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Search Box on Every Page

Search Box on Every Page

Locked

Views: 1,209

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
27 Mar 2009, 8:51 AM
#1
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Search Box on Every Page

Hi I'm about to start a website build for a car supermarket and they require a small search box on every page. The search terms will be as follows:

Car Make

Car Model

Car Price (Min)

Car Price (Max)

So first of all can this be done and secondly can this be put on every page? I'm planning to put this in a left sidebox (see attached)

Many Thanks

Nick

27 Mar 2009, 9:17 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Search Box on Every Page

Yes, it can be done ... here's a similar but more difficult example on a Zen Cart. Putting it in a sidebox is the right approach, and then the sidebox can be displayed on every page.

27 Mar 2009, 9:33 AM
#3
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Search Box on Every Page

Hi please can you end me the link and explain a bit more in detail?

Thanks

Nick

27 Mar 2009, 9:41 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Search Box on Every Page

Sorry, this is the link -> http://www.trinity-homes.net/shop/

That works as a form passing parameters to an amended version of the advanced_search_result page which searches a new product type that extends the general product type to add the custom fields.

27 Mar 2009, 10:21 AM
#5
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: Search Box on Every Page

Thanks for that.

are you able to provide instructions on how I would do this?

Thanks

Nick

9 Mar 2010, 8:53 PM
#6
paul52 avatar

paul52

New Zenner

Join Date:
Mar 2010
Posts:
1
Plugin Contributions:
0

Re: Search Box on Every Page

Hi,

I am using Zen Cart v1.3.8a/v1.3.8.

I hope that I am posting in the right place.

I was hoping that someone could help me with code. I would like to have a page to link too like for example About US, instead of a sidebox, but the way that http://www.trinity-homes.net/shop/
has check boxes that would bring up the categories that are checked. I am not much of a code guy, but here is what I have:

<div id="navColumnOneWrapper" style="width: 200px"><!--// bof: plansearchsidebox //--> <div class="leftBoxContainer" id="plansearchsidebox" style="width: 200px"> <h3 class="leftBoxHeading" id="plansearchsideboxHeading">Find Your Plan</h3> <div id="plansearchsideboxContent" class="sideBoxContent"><form name="plan" method="get"><input type="hidden" name="plan" value="5" /> <br /> <br> <input type="checkbox" name="plan" value="index.php?cPath=375"> Entire yard<br> <input type="checkbox" name="plan" value="index.php?cPath=376"> Front yard or front/side only<br> <input type="checkbox" name="plan" value="index.php?cPath=377"> Back yard or back/side only<br> <input type="checkbox" name="plan" value="index.php?cPath=378"> Small/medium specified area only<br> <input type="checkbox" name="plan" value="index.php?cPath=379"> Small yard–Less than .5 acre<br> <input type="submit" onclick="get_check_value()"> </form>

It will not bring up but one category - the last one in the check list.

9 Mar 2010, 9:30 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Search Box on Every Page

Paul

You're trying to pass a URL as a value. This could work if you only wanted to send a visitor to one category (rather than display a list of search results as per Trinity Homes), but you can't send a visitor off to multiple pages at the same time.

The Trinity Homes sidebox requires a way more sophisticated approach. This would involve coding each product with information about square footage, numbers of bedrooms and bathrooms, property levels and architectural styles. Styles should really be defined in a table with a dedicated admin page to maintain them. The checked boxes would be passed as an array to an enhanced version of the Zen Cart search algorithm for use as a custom filter.