Custom Search Template gets Truncated

General ShopSite user discussion

Custom Search Template gets Truncated

Postby phozgood » Thu Feb 28, 2008 1:23 pm

Im Having an issue on my custom search template with an embedded stylesheet and SS tags inserted. The display of an SS-generated Search Results Page is getting cut off close to the [-- SEARCH _FORM--] tag. Can’t see anything in the html template or when I view source that would explain it.

Heres a piece of the code where its happening. The cutoff point is indicated by the red text starting in the align attribute preceeding the search form tag. Everything after it is truncated in the browser.

<BODY BGCOLOR=#FFFFFF>
<div align="center">
<table border="0" cellspacing="10">
<tr><td colspan=3> <!-- ADD APARTS LOGO -->Logo Banner</td></tr>
<tr><td colspan=3 align="center" >[-- SEARCH_FORM --]</td></tr>

I didn’t want to dump the whole page of code on ya, but you may need more info than Ive given here. Thanks in advance!

phoz
phozgood
 
Posts: 3
Joined: Fri Feb 22, 2008 11:46 am

Postby Jim » Thu Feb 28, 2008 4:23 pm

A url so we can look at the page source would be helpful.

Maybe it isn't recognizing the closing comment tag on this "<!-- ADD APARTS LOGO -->Logo " since there is no space after the ">'.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby loren_d_c » Thu Feb 28, 2008 5:41 pm

I don't know if [-- SEARCH_FORM --] is a valid tag on a search results page. Try taking it out and see if that helps.

Note that on a search results page you should have a [-- SEARCHRESULT_FORM --] tag to generate the search field (and the links to the additional results pages, and the sorting pull-downs, etc). See the documentation for this tag in the search template documentation at:

http://www.shopsite.com/help/9.0/en-US/ ... earch.html

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Truncated search results

Postby phozgood » Fri Feb 29, 2008 9:36 am

Thanks guys. Loren's suggestion to delete the seach tag did the trick. But now Ive got another problem. After verifying that taking out the tag did reveal the whole page, I must have changed something else and the search function doesnt seem to work anymore. I get an hour glass that doesnt go anywhere.
Any ideas?

For what its worth, Heres the code with the left nav column links and stylesheet removed:

Code: Select all
[-- DEFINE SEARCH_RESULTS --]
<html>
<head>
<title>[-- VAR.pa_name --]</title>

<style type="text/css">
</style>


</HEAD>

<BODY BGCOLOR=#FFFFFF>

<div align="center">



<table border="0" cellspacing="10">
<tr><td colspan=3> <!-- ADD APARTS LOGO --></td></tr>


<tr><td colspan=3 align="center" ><!-- SEARCH_FORM was here --></td></tr>

<!-- LEFT TEXT-NAV COLUMN CELL STARTS-->
<!-- LEFT TEXT-NAV COLUMN CELL ENDS-->

   <!-- SPACER CELL -->
   <td></td>
   

   <!-- CONTENT CELL BEGINS-->
   <td width="519" align="left" valign="top">
   
   
   
         <div id="content">
       <h2>A Parts Warehouse Search Results</h2>
      
       <br /><br />
      

      <table border="1">
   [-- LOOP SEARCH --]
     [-- IF SEARCHPRODUCT --]
       <td>Product:</td>
     [-- END_IF --]
     [-- IF SEARCHLINK --]
       <td>Link:</td>
     [-- END_IF --]
     [-- SEARCHRESULT --]
   [-- END_LOOP SEARCH --]
   </table>
   

<br>
   </div>            
            
   <!-- CONTENT CELL ENDS--></td></tr>   
   
   <!-- Footer Nav Begins-->
               
</table>
   <table><tr><td width="737"><hr  size="1"></td></tr></table>
   <table border=0>
   <tr><td width="519" align="center">
               <div id="tabletext1">
               
       <a name="A Parts Home" id="A Parts Home" href="index.html" title="Home Page">Home</a>
      | <a name="Account" id="Account" href="account.html" title="User Account">Your Account</a>
      | <a name="Shopping Cart" id="Shopping Cart" href="/store/index.html" target="_blank" title="Shopping Cart">Shopping Cart</a>
      | <a name="About Us" id="About Us" href="aboutus.html" title="About Us">About Us</a>
      | <a name="Contact Us " id="Contact Us " href="contact.html" title="Contact">Contact Us</a>
      | <a name="Links" id="Links" href="links.html" title="Links">Links</a>
      </div></td></tr>
      
   <tr><td width="519" align="center"><div id="tabletext2">Copyright 2006, 2008 A Parts Warehouse.</div></td></tr>
   </table>

</div>
</body>
</html>
[-- END_DEFINE SEARCH_RESULTS --]




phoz
phozgood
 
Posts: 3
Joined: Fri Feb 22, 2008 11:46 am

Postby Jim » Fri Feb 29, 2008 10:55 am

I put the template in a test store and don't see the problem you mention. Note that there is no search form on the page with the template the way it is shown here. to get a search form you need to use the tag
[-- SEARCHRESULT_FORM --] that Loren mentioned in place of the
[-- SEARCH_FORM --] that you previously had.

Also note that if you have more than one page the product can be found on the layout will not be what you probably expect since you would have multiple "Link:" sections which will display in the same row followed by the next "Product:" and then the product detail will display on the next row.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby phozgood » Fri Feb 29, 2008 1:06 pm

Jim,
Thanks. With your suggestion, I was able to get a working search input box on the search results page. I am struggling with getting what I want out of this particular custom search template though. Definately harder for me to make work than other custom templates. Ive resigned to using one based on Shopsites default search template for the time being, but will be working on this more involved one behind the scenes until I can figure out how to make it work. Now its displaying my template layout close to the way I want it, but its finding no products.

phoz
phozgood
 
Posts: 3
Joined: Fri Feb 22, 2008 11:46 am

Postby Jim » Fri Feb 29, 2008 1:48 pm

Does the default ShopSite search template "find" products? If it does then the problem is that your template isn't displaying them. However when I used that template just as you had it products were displayed in my test store. If you don't see products even with the ShopSite search template then perhaps you don't have search enabled on your store. Make sure that you have all pages where you have products you want indexed set to index by checking the box on Edit Page Content - "Index: Check here to have this page indexed for product search" which is located near the bottom of the page. Also make sure that you have fields selected for indexing on Preferences > Search Settings > Search Indexing. And make sure that you have the indexing feature enabled on Utilities > Publish > Index for search during update.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 113 guests

cron