X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Search Results Template mod (https://forum.x-cart.com/showthread.php?t=5215)

Jerry 11-13-2003 07:20 AM

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"}

xcell67 05-22-2004 08:11 PM

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.


All times are GMT -8. The time now is 05:09 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.