X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Result Pages x of y (https://forum.x-cart.com/showthread.php?t=11950)

Alltribes 02-04-2005 07:27 AM

Result Pages x of y
 
I want to display the number of result pages and the page the customer is on. We cut off the max number of pages displayed at once to 10 because more was stretching the page out at lower resolutions. So we need to show the customer how many pages there are total, like Page: 3 of 24.

Has anyone done this to their cart? Any pointers before I attempt it myself?

It seems like an easy mod to do, just a lot of trial an error for a newbie like me.

balinor 02-04-2005 03:56 PM

Please read the forum rules and stickies before you post. This forum is for COMPLETED mods only. If you would like someone to create a mod for you, post in the Professional Offers - Requests forum. Or, you can just post in the Storefront Design section or Template Editing section.

shan 02-04-2005 05:52 PM

Works for V4.0.x


Code:

{* $Id: navigation.tpl,v 1.14 2004/06/24 13:09:51 max Exp $ *}

{* NAVIGATION MOD BY SHAN - WWW.FUTUREWEBSERVICES.COM *}

{if $total_pages gt 2}
<TABLE border="0" align="center" cellpadding="5" cellspacing="0">
<TR >

{if $navigation_page ne $start_page}

<TD>[img]{$ImagesDir}/larrow.gif[/img]Previous Page</TD>
{/if}
<td align="center">Products {$first_item} to {$last_item} of {$total_items}</td>


{if %page.last%}
{math equation="pages-1" pages=$total_pages assign="total_pages_minus"}
{if $navigation_page lt $total_super_pages*$config.Appearance.max_nav_pages}
<TD align="right">Next Page[img]{$ImagesDir}/rarrow.gif[/img]</TD>
{/if}
{/if}

</TR>
</TABLE>
<TABLE border="0" align="center" cellpadding="5" cellspacing="0">
<TR height="14">
  <TD align="center" >Page </TD>
{section name=page loop=$total_pages start=$start_page}

{if %page.index% eq $navigation_page}
<TD align="center" title="{$lng.lbl_current_page}: #{%page.index%}"  id=TextPink>
[ {%page.index%} ]
</TD>
{else}
{if %page.index% ge 100}
{assign var="cell_width" value="23"}
{assign var="suffix" value="_wide"}
{else}
{assign var="cell_width" value="17"}
{assign var="suffix" value=""}
{/if}
<TD align="center" >{%page.index%}
</TD>
{/if}

{/section}
</TR></TABLE>
{/if}


and yes please read the rules before posting

Alltribes 02-04-2005 06:20 PM

Sorry about that.

balinor 02-04-2005 07:06 PM

No problem...looks like Shan saved you by posting a mod ;)

xcell67 07-07-2005 04:36 PM

has anyone modified this to work for the version 3 branch? I really need this but not enough to upgrade to 4.0. I've made waaaaay too many modifications to my cart and it would take months to upgrade, so please someone anyone, tell me that they have this working for v3.

thanks

balinor 07-07-2005 04:37 PM

You could just reverse engineer this one for 3.x, or ask Shan real nice to do it for you :)

shan 07-08-2005 03:22 AM

have you tried it for v3 would probably work already.

test it and post back here

dgreen 07-11-2005 11:12 AM

What about showing how many pages there are?
 
Hi
This looks great for showing how many products there are and where we are relative the total amount. How can I show how many pages there are?
Also, when you hit the maximum pages that has been defined, you don't have any more page numbers to click.
Thanks so much

xcell67 07-23-2005 03:30 PM

ive tried for v3, it doesnt help, the page numbers still throw the page off. I think its because the code valls variables that don't exist in v3.


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

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