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

Search resuts message

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-02-2007, 10:09 PM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Search resuts message

When I submit a search, on the search results page it will display:
"5 results found"

> I would like to have it display:
"BIKES returned 5 results"

Can someone help me get the "search term" to display with the results message?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #2  
Old 01-03-2007, 12:05 PM
  DisCost's Avatar 
DisCost DisCost is offline
 

Member
  
Join Date: Sep 2006
Location: 11201 Roosevelt Way NE, Seattle WA 98125 USA
Posts: 11
 

Default Re: Search resuts message

Make a backup of any template you edit, I don't garentee that this will work as I have heavily modded my site and early on I didn't comment as heavily as i should have :*)

in your search_result.tpl right after {if $mode eq "search"}

Quote:
{if $total_items gt "1"}
{$lng.txt_N_results_found|substitute:"items":$tota l_items} for "{$search_prefilled.substring}"

I'm not sure how much of this code is prexhisting but I'll break it down for you:
the 'if mode eq search' is pretty self explanitory as is 'if total items gt 1' part.
the language variable may not be in your database to check if it is and/or add if it isn't go into your language section in your admin pannel and search for "results found' in the text class. add 'txt_N_results_found' if you don't see it and in your wording put 'items' where you want the total number of items to appear my wording is thus:"items results found" you could put the 'for' in the txt variable if you want, i just have it hanging out in the template.
The '|substitute:"items":$total_items' part of the variable does what you expect, substitues the word 'items' with the variable total_items.
I have the html codes for " " around the search variable.
__________________
www.displaycostume.com
X-Cart Ver 4.3.1
Reply With Quote
  #3  
Old 01-04-2007, 08:33 PM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default Re: Search resuts message

It worked; thank you for the help.
__________________
x-cart 4.0.16v
linux server
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:00 AM.

   

 
X-Cart forums © 2001-2020