Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Add-ons for VP-ASP
 Display # of Products per page
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

perinius
Starting Member

USA
47 Posts

Posted - November 09 2004 :  13:30:56  Show Profile  Reply with Quote
I have the code from Hakan site that shows how to display a certain number of products per page but it defaults to the search page and not the category that the user is on.
I tried to include a server variable that made the path the current page and not the default page but it is not working. Any advice would be appreciated.

<%
Dim plink
plink = Request.ServerVariables("URL")&"?"&Request.ServerVariables("QUERY_STRING")
dim thispage2
thisPage2 = LCase(Request.ServerVariables("SCRIPT_NAME"))
With Response
If InStr(thisPage2, "/shopdisplayproducts.asp") <> 0 Then
.Write ("<table width=""95%"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=""#ffffff""><tr><td><div align=""right""><font color=""#660000"" size=""1"">Display </font><a href=""shopdisplayproducts.asp?pagesize=12"">12</a> <a href=""shopdisplayproducts.asp?pagesize=24"">24</a> <a href=""shopdisplayproducts.asp?pagesize=48"">48</a> <a href=""shopdisplayproducts.asp?pagesize=96"">96</a> <a href=""shopquery.asp"">All</a> <font color=""#660000"" size=""1"">items per page</font></font></div></td></tr></table>")
End If
End With

%>
<%'=plink%>

Thanks,



perinius
Starting Member

USA
47 Posts

Posted - November 09 2004 :  19:48:55  Show Profile  Reply with Quote
After reading this for myself I didn't really make my question too clear.
The 'plink' variable pulls the current url but I need it to pull from within the link, with querystring. For example:

../shopdisplayproducts.asp?cat=Surf
should then pull ../shopdisplayproducts.asp?cat=Surf?pagesize=24 when clicked on the "display 24" link. But I get an error on it?

Here is the code I am trying to use that doesn't work:

<%
Dim plink
plink = Request.ServerVariables("URL")&"?"&Request.ServerVariables("QUERY_STRING")
dim thispage2
thisPage2 = LCase(Request.ServerVariables("SCRIPT_NAME"))
With Response
If InStr(thisPage2, "/shopdisplayproducts.asp") <> 0 Then
.Write ("<table width=""95%"" border=""0"" cellspacing=""0"" cellpadding=""0"" bgcolor=""#ffffff""><tr><td><div align=""right""><font color=""#660000"" size=""1"">Display </font><a href=""<%plink%>?pagesize=12"">12</a> <a href=""<%plink%>?pagesize=24"">24</a> <a href=""<%plink%>?pagesize=48"">48</a> <a href=""<%plink%>?pagesize=96"">96</a> <a href=""shopquery.asp"">All</a> <font color=""#660000"" size=""1"">items per page</font></font></div></td></tr></table>")
End If
End With

%>
<%'=plink%>



Edited by - perinius on November 09 2004 19:51:30
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00