Print Page | Close Window

page navigation

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=2065
Printed Date: 26-July-2025 at 8:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: page navigation
Posted By: ptucker
Subject: page navigation
Date Posted: 16-October-2008 at 10:16am

When browsing products the navigation is:

Page 3 of 41  -  1 2 3 4 5 6 7 8 9 10 11 Next 10 Pages  Last
 
I want to add a "previous page" and "next page" to make it easier for the customers.  Having to click the page number to move to the next page is a pain and not user friendly.  How  can I accomplish this so it looks something like this:
 
Page 3 of 41 - Previous Page 1 2 3 4 5 6 7 8 9 10 11 Next Page Next 10 Pages Last
 
viewcategories.asp is the page this appears on.



Replies:
Posted By: BrianRoden
Date Posted: 13-May-2009 at 4:12pm
I'm still testing, but here's what I came up with this afternoon trying to do the same thing.
There are two sections to insert around the for...next loop that writes the page number links. I've included the whole block from the beginning of my code, through ProductCart's for...next loop, to the end of my second insertion. All this is around line 990.

<!-- Previous Page inserted by Brian Roden 05/13/09 -->

if iPageCurrent > 1 then%>

<a rel="nofollow" href="viewCategories.asp?pageStyle=<%=pcPageStyle%>&ProdSort=<%=ProdSort%>&page=<%=iPageCurrent-1%>&idCategory=<%=mIdCategory%><%=pcv_strCSFieldQuery%>">Previous page</a>

<%end if

<!-- end Previous Page insertion -->

For pageNumber=intPageNumber To (cint(iPageCurrent) + (iPageNext))

If Cint(pageNumber)=Cint(iPageCurrent) Then %>

<strong><%=pageNumber%></strong>

<% Else %>

<a rel="nofollow" href="viewCategories.asp?pageStyle=<%=pcPageStyle%>&ProdSort=<%=ProdSort%>&page=<%=pageNumber%>&idCategory=<%=mIdCategory%><%=pcv_strCSFieldQuery%>"><%=pageNumber%></a>

<% End If

Next

<!-- Next Page inserted by Brian Roden 05/13/09 -->

if iPageCurrent < cint(thepagecount) then%>

<a rel="nofollow" href="viewCategories.asp?pageStyle=<%=pcPageStyle%>&ProdSort=<%=ProdSort%>&page=<%=iPageCurrent+1%>&idCategory=<%=mIdCategory%><%=pcv_strCSFieldQuery%>">Next page</a>

<%end if

<!-- end Next Page insertion -->



Posted By: worldofrugs
Date Posted: 05-June-2009 at 4:14pm
Hey Brian,
Super you are doing this, as it is exactly what I'm trying to implement now in V 3.12 (yeah I need to update once I get a chance  haha!)...
You stated in your post, that you're still testing it.. As the post was of May-13... Have you finished / implemented it? If so, do you mind sharing it with me / us ?
I would be SOOOOOO greatfull!! Clap
Also what version are you using, as it might be slightly different?
Please let me know when you have a chance...
Thanks Wink


Posted By: BrianRoden
Date Posted: 05-June-2009 at 4:22pm

I posted the code before completely testing it, but it worked A-OK as posted. Use it!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net