VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 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