Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Search Results Template mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-13-2003, 07:20 AM
 
Jerry Jerry is offline
 

Member
  
Join Date: May 2003
Location: Santa Rosa, CA
Posts: 18
 

Default Search Results Template mod

I am trying to make small mod on the /customer/main/search_result.tpl so that customers get a bit of encouragement to search some more before giving up. I've run in to two problems.

1) I can't use quotation marks in the copy. As soon as I do, nothing shows when I do search. The whole search results area is blank. I want the copy to say something like: if you use the word "trees" and get nothing then try "tree". If I use a quote, it blows up.

2) I want to show the search terms that the customer used, i.e., "We found nothing under the search terms "trees"." The guys at x-cart gave me the code "{$smarty.get.substring}" to enter. When I inserted it in to my copy (with or without quotation marks) I just got a blank space again.

Any suggestions out there from you Smarty code people would be much appreciated. Thanks, G.


This is my current code---
{* $Id: search_result.tpl,v 1.11 2003/04/09 09:57:07 svowl Exp $ *}
{ include file="location.tpl" last_location=$lng.lbl_search_results}
{include file="customer/main/navigation.tpl"}
{capture name=dialog}
{include file="customer/main/products.tpl"}
{/capture}
{if $products}
{include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra="width=100%"}
{else}
{include file="dialog.tpl" title=$lng.lbl_search_results content="Sorry, your search for XXXXX produced no results.

Please try another name, or try Search Options.


Search Tips:</p>
<ul>[*]What if no results were found?

Try searching again using fewer keywords to broaden your search, or browse a specific category of merchandise.
[*]How many keywords should I use?

One keyword will locate a broad selection of products. For saddles, the results will include every type of saddle, from Aussie to Western. For the best results, use two or three specific keywords. Remember to try alternative spellings, saddle stand instead of saddle stands.[/list]" extra="width=100%"}
{/if}
{include file="customer/main/navigation.tpl"}
Reply With Quote
  #2  
Old 05-22-2004, 08:11 PM
 
xcell67 xcell67 is offline
 

Senior Member
  
Join Date: Dec 2003
Posts: 149
 

Default

nice mod, I tried {$smarty.get.substring} but also got a blank space, I think it may have something to do with that variable not being assigned in search.php, could be wrong though.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:11 PM.

   

 
X-Cart forums © 2001-2020