Customize the search form

General ShopSite user discussion

Customize the search form

Postby natez311 » Mon Nov 09, 2009 11:35 am

Hi again,

Is it possible to customize the [-- SEARCH_FORM --] and have it output the html differently?

This was the way I originally had the html for my search box:
<form>
<fieldset>
<label for="search">Search</label>
<input type="text" id="search" />
<input type="submit" id="submitSearch" />
</fieldset>
</form>

Shopsite is outputting this from the [-- SEARCH_FORM --] tag:

<form name="productsearch" class="productsearch" action="http://shopsite.bizland.com/ss10.0/sc/productsearch.cgi" method=post >
<center>
<input type=text name="search_field" size=40>
<input type=hidden name="storeid" value="*1e84439f9e10378fed00f4073f9fbdb235">
<input type=image src="http://shopsite.bizland.com/ss10.0/shopsite-images/en-US/buttons/transparent/blacktext-search.gif" align=top border=0 name="/buttons/transparent/blacktext-search.gif" alt="/buttons/transparent/blacktext-search.gif">
</form></center>
</form>

Any suggestions would be helpful, thanks!
Thanks!

-Nate
natez311
 
Posts: 26
Joined: Fri Oct 30, 2009 10:52 am
Location: New York

Postby Jim » Mon Nov 09, 2009 11:47 am

First you must have one ShopSite generated page with a ShopSite search form on it for indexing to happen. That page does not have to be visible on your store though.

Once you have that condition met it doesn't matter if you manually code the search form in your template or use the template tag [-- SEARCH_FORM --]. So if you want the search form to look different just code the form into your custom template and don't use the template tag.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby natez311 » Mon Nov 09, 2009 12:20 pm

Thanks Jim,

A problem I am running into right now with the search template layout is that in it I use an include for both the header and footer, here is the code:

[-- DEFINE SEARCH_RESULTS --]
[--INCLUDE head PROCESS--]
<div class="bd">
[--INCLUDE sideBar PROCESS--]
[-- SEARCHRESULT_FORM FORM_ONLY --]</form>
</div>
[--INCLUDE foot PROCESS--]
[-- END_DEFINE SEARCH_RESULTS --]

Right now I am only trying to generate a simple search results page. But from this code I am getting an "Internal Server Error". I would like to use my header and footer includes for the search results page, any ideas? Thanks again for all your help so far!
Thanks!

-Nate
natez311
 
Posts: 26
Joined: Fri Oct 30, 2009 10:52 am
Location: New York


Return to User Forum

Who is online

Users browsing this forum: No registered users and 99 guests