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

Total number of products and current prodcuts displayed.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-25-2009, 06:23 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Total number of products and current prodcuts displayed.

Having some trouble with this one.

Want something like this

Showing 1-33 of 354 products

The 1-33 are the current products being displayed and the 354 is the total number of products in the category.

Been trying this one for about 2 hours and I give
__________________
xcart 5.1.2
Reply With Quote
  #2  
Old 05-25-2009, 07:23 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,192
 

Default Re: Total number of products and current prodcuts displayed.

See this for starter and change it to what you need
Code:
{if $mode eq "search"} {if $total_items gt "1"} {$lng.txt_N_results_found|substitute:"items":$total_items}<br /> {$lng.txt_displaying_X_Y_results|substitute:"first_item":$first_item:"last_item":$last_item} {elseif $total_items eq "0"} {$lng.txt_N_results_found|substitute:"items":0} {/if} <br /> <br /> {/if}
BTW take a look at the search_results.tpl and you will find all the code you need it there
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 05-25-2009, 07:29 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Total number of products and current prodcuts displayed.

I want htis on the products page, not the search page.
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 05-25-2009, 07:38 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,192
 

Default Re: Total number of products and current prodcuts displayed.

Yes I just pointed you to where you can find code that does this. You will have to change it of course and put it where you need it. But if you follow this code and find out where and how "$total_items" is coming from you will have it
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 05-25-2009, 07:46 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Total number of products and current prodcuts displayed.

Doesn't seem like the info is available on products_t.tpl and I'm not sure how to get it there.

Look like it's coming from /includes/search.php but search.php is included in products.php.

a little confused here.
__________________
xcart 5.1.2
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 PM.

   

 
X-Cart forums © 2001-2020