Product search template help

General ShopSite user discussion

Product search template help

Postby rammac13 » Thu Oct 18, 2007 10:53 am

I am using the Text 3 on Left side for the Link Template and I want the information that is in Text 3 to be on the left side next to the product search results. As of now it is under the product search results. I tried moving Text 3 up in the code but it then just puts the Text 3 content above the product search results. Thanks for any help.



#
# Search Results define
#
[-- DEFINE SEARCH_RESULTS --]
<html>
<head>
<title>[--Store.SearchResults --]: [-- SearchString --]</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body
[-- IF PAGE.BACKGROUNDIMAGE --]
background=[-- PAGE.BACKGROUNDIMAGE --]
[-- END_IF --]
bgcolor="[-- PAGE.BACKGROUNDCOLOR --]" text="[-- PAGE.TEXTCOLOR --]" link="[-- PAGE.LINKCOLOR --]" vlink="[-- PAGE.VISITEDLINKCOLOR --]" alink="[-- PAGE.ACTIVELINKCOLOR --]" >

[-- IF PAGE.DISPLAYPAGEHEADER --]
[-- HEADER --]
[-- END_IF --]
[-- IF PAGE.DISPLAYGRAPHIC --]
<center>[--PAGE.GRAPHIC --]</center>
[-- END_IF --]
[-- IF PAGE.DISPLAYNAME --]
<center> <h1> [--PAGE.NAME --] </h1> </center>
[-- END_IF --]
#Search form at top of page

<h3>[--Store.SearchResults --]: [-- SearchString --]</h3>
<hr>

[-- IF PAGE.TEXT1 --]
<br>[-- PAGE.TEXT1 --]<br>
[-- END_IF --]
# set layout variable - save time looking up value repeatedly from the database

[-- VAR.LAYOUT PAGE.LAYOUT --]

#Start of the loop to output the search results - Products with associated Links
<b>[--Store.SearchResultPage --]:</b><br>
[-- IF SEARCHTOP --]
[-- SEARCHRESULT_FORM --]
</center>
[-- END_IF --]

<table border="0" cellpadding="5" width="95%">
[-- VAR.pa_search_result "false" --]
[-- LOOP SEARCH --]
[-- IF SEARCHLINK --]
<tr>
<td></td>
<td align="left" valign="top">
<b>
[-- END_IF --]

[-- SEARCHRESULT --]

[-- IF SEARCHLINK --]
</b>
</td>
<td></td>
<td></td>
</tr>
[-- END_IF --]
[-- VAR.pa_search_result "true" --]
[-- END_LOOP SEARCH--]
[-- IF VAR.pa_search_result "false" --]
<tr>
<td align="left" valign="top">[-- STORE.88 --] [-- SEARCHSTRING --]</td>
</tr>
[-- END_IF --]

[-- IF VAR.Quantityproduct "yes" --]
<tr>
<td>
[-- Store.QuantityPricingFlag --] [-- Store.QuantityPricingMsg --]
</td>
</tr>
[-- END_IF --]

[-- IF VAR.Variableproduct "yes" --]
<tr>
<td>
[-- Store.VariablePricingFlag --] [-- Store.VariablePricingMsg --]
</td>
</tr>
[-- END_IF --]
</table>

#Search form at bottom of page
[-- IF SEARCHBOTTOM --]
[-- SEARCHRESULT_FORM --]
</center>
[-- END_IF --]

[-- IF PAGE.TEXT2 --]
<br>[--PAGE.TEXT2 --]<br>
[-- END_IF --]
[-- IF PAGE.DISPLAYPAGEFOOTER --]
[-- FOOTER --]
[-- END_IF --]
[-- IF PAGE.TEXT3 --]
[-- PAGE.TEXT3 --]
[-- END_IF --]
</body>
</html>
[-- END_DEFINE SEARCH_RESULTS --]
rammac13
 
Posts: 35
Joined: Thu Oct 18, 2007 10:30 am
Location: Oregon

RE: Product search template help

Postby ShopSite Lauren » Mon Oct 22, 2007 12:10 pm

The search template that you have listed below is the default search template. This template does not have different columns for the text fields on the page. If you would like to have the text 3 field displayed on the left side of the page, you would need to create a custom template (or modify an existing one) to display this. Below is an example of a modified template which will display text 3 on the left hand side of the page:

------------------------------------------------------------------------
#
# Search Results define
#
[-- DEFINE SEARCH_RESULTS --]
<html>
<head>
<title>[--Store.SearchResults --]: [-- SearchString --]</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body
[-- IF PAGE.BACKGROUNDIMAGE --]
background=[-- PAGE.BACKGROUNDIMAGE --]
[-- END_IF --]
bgcolor="[-- PAGE.BACKGROUNDCOLOR --]" text="[-- PAGE.TEXTCOLOR --]" link="[-- PAGE.LINKCOLOR --]" vlink="[-- PAGE.VISITEDLINKCOLOR --]" alink="[-- PAGE.ACTIVELINKCOLOR --]" >

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td colspan="2">
[-- IF PAGE.DISPLAYPAGEHEADER --]
[-- HEADER --]
[-- END_IF --]
[-- IF PAGE.DISPLAYGRAPHIC --]
<center>[--PAGE.GRAPHIC --]</center>
[-- END_IF --]
[-- IF PAGE.DISPLAYNAME --]
<center> <h1> [--PAGE.NAME --] </h1> </center>
[-- END_IF --]
#Search form at top of page

<h3>[--Store.SearchResults --]: [-- SearchString --]</h3>
<hr>
</td>
</tr>

<tr>
<td width="150">
[-- IF PAGE.TEXT3 --]
[-- PAGE.TEXT3 --]
[-- END_IF --]
</td>

<td>

[-- IF PAGE.TEXT1 --]
<br>[-- PAGE.TEXT1 --]<br>
[-- END_IF --]
# set layout variable - save time looking up value repeatedly from the database

[-- VAR.LAYOUT PAGE.LAYOUT --]

#Start of the loop to output the search results - Products with associated Links
<b>[--Store.SearchResultPage --]:</b><br>
[-- IF SEARCHTOP --]
[-- SEARCHRESULT_FORM --]
</center>
[-- END_IF --]

<table border="0" cellpadding="5" width="95%">
[-- VAR.pa_search_result "false" --]
[-- LOOP SEARCH --]
[-- IF SEARCHLINK --]
<tr>
<td></td>
<td align="left" valign="top">
<b>
[-- END_IF --]

[-- SEARCHRESULT --]

[-- IF SEARCHLINK --]
</b>
</td>
<td></td>
<td></td>
</tr>
[-- END_IF --]
[-- VAR.pa_search_result "true" --]
[-- END_LOOP SEARCH--]
[-- IF VAR.pa_search_result "false" --]
<tr>
<td align="left" valign="top">[-- STORE.88 --] [-- SEARCHSTRING --]</td>
</tr>
[-- END_IF --]

[-- IF VAR.Quantityproduct "yes" --]
<tr>
<td>
[-- Store.QuantityPricingFlag --] [-- Store.QuantityPricingMsg --]
</td>
</tr>
[-- END_IF --]

[-- IF VAR.Variableproduct "yes" --]
<tr>
<td>
[-- Store.VariablePricingFlag --] [-- Store.VariablePricingMsg --]
</td>
</tr>
[-- END_IF --]
</table>

#Search form at bottom of page
[-- IF SEARCHBOTTOM --]
[-- SEARCHRESULT_FORM --]
</center>
[-- END_IF --]

[-- IF PAGE.TEXT2 --]
<br>[--PAGE.TEXT2 --]<br>
[-- END_IF --]
</td>
</tr>

<tr>
<td colspan="2">
[-- IF PAGE.DISPLAYPAGEFOOTER --]
[-- FOOTER --]
[-- END_IF --]
</td>
</tr>
</table>
</body>
</html>
[-- END_DEFINE SEARCH_RESULTS --]
------------------------------------------------------------------------

Once you have created your template, you can save changes, then go to Preferences > Search Settings > Search Layout (if you have ShopSite Manager you would just go to Preferences > Search Settings), and on this screen you can select the new modified template that you have created (should be at the bottom of the search template pull down menu).

-Lauren
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to User Forum

Who is online

Users browsing this forum: No registered users and 102 guests

cron