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

How to display total results for search

 
Reply
   X-Cart forums > X-Cart 4 > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-20-2003, 07:03 PM
 
rockci rockci is offline
 

Newbie
  
Join Date: Dec 2002
Posts: 5
 

Default How to display total results for search

Can someone offer a tip on how to display the number of
matches found after executing the search on the search results or the navigation above it ?
__________________
ROCK Capital Interactive
216-798-ROCK
X-Cart version 3.4.12
PHP 4.1.2
MySQL server 3.23.51
Web server Stronghold/2.4.2 Apache/1.3.6 C2NetEU/2412 (Unix) PHP/4.1.2
Operation system FreeBSD
Perl 5.008
Net::SSLeay 1.07
Reply With Quote
  #2  
Old 02-21-2003, 12:56 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

post removed cos it was cr*p
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 02-21-2003, 01:02 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

sorry..no it wont.

have removed the previous post cos it didn't fully work.

Will put a new one in shortly.
__________________
ex x-cart guru
Reply With Quote
  #4  
Old 02-21-2003, 01:17 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

Okay .. this will.

add the following line to search.php after the $smarty->assign("main","search");

Code:
$smarty->assign("totalprod",$total_products_in_search);

new code for search_result.tpl:

Code:
{* $Id: search_result.tpl,v 1.10 2002/10/11 12:43:43 ambal Exp $ *} { include file="location.tpl" last_location=$lng.lbl_search_results} Your search produced : {$totalprod} results. </p> {include file="customer/main/navigation.tpl"} {capture name=dialog} {include file="customer/main/products.tpl"} {/capture} {if $products ne ""} {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="No matching products found" extra="width=100%"} {/if} {include file="customer/main/navigation.tpl"}
enjoy.
__________________
ex x-cart guru
Reply With Quote
  #5  
Old 02-21-2003, 06:28 AM
 
pomfret pomfret is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Pomfret Center, CT
Posts: 94
 

Default

Works like a charm

Thanks!
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:50 PM.

   

 
X-Cart forums © 2001-2020