ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - page navigation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

page navigation

 Post Reply Post Reply
Author
Message
ptucker View Drop Down
Newbie
Newbie


Joined: 09-October-2008
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote ptucker Quote  Post ReplyReply Direct Link To This Post Topic: page navigation
    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.
Back to Top
BrianRoden View Drop Down
Groupie
Groupie


Joined: 07-September-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrianRoden Quote  Post ReplyReply Direct Link To This Post 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 -->

Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post 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


Edited by worldofrugs - 05-June-2009 at 4:16pm
Back to Top
BrianRoden View Drop Down
Groupie
Groupie


Joined: 07-September-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote BrianRoden Quote  Post ReplyReply Direct Link To This Post Posted: 05-June-2009 at 4:22pm

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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.070 seconds.