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
 VP-ASP 7.0 Questions
 Solved: Hide paging options if only 1 page exists
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kessa
Starting Member

36 Posts

Posted - July 04 2012 :  09:58:38  Show Profile  Reply with Quote
Hi,

Is there a way to hide the paging option if only 1 page (i.e. less than X number of results) exists?

Currently I can only seem to see:
a) an option to turn it on/off completely
b) an option to change paging numbers to "prev" and "next"

Cheers

Edited by - Kessa on October 24 2012 17:07:05

diegomilito
VP-ASP Expert

Argentina
723 Posts

Posted - August 17 2012 :  22:55:20  Show Profile  Reply with Quote
u follow my direction :
- download file
- open it and search this code in around 273-280 (im not sure if yours are same line) :

htmlwrite "<p class=""ac"">" & smallinfofont & GetLang("langCommonPage") & " " & mypage & GetLang("langCommonOf") & " " & maxpages
htmlwrite " "
if getconfig("xproductpagingnextprevious")="Yes" then
Call PageNavBarNext (SQL)
else
Call PageNavBar (SQL)
end if
htmlwrite smallinfoend & "</p>"

- and replace existing coding with new code below :

if maxpages = 1 then
else
htmlwrite "<p class=""ac"">" & smallinfofont & GetLang("langCommonPage") & " " & mypage & GetLang("langCommonOf") & " " & maxpages
htmlwrite " "
if getconfig("xproductpagingnextprevious")="Yes" then
Call PageNavBarNext (SQL)
else
Call PageNavBar (SQL)
end if
htmlwrite smallinfoend & "</p>"
end if

- do a search again for coding below 378-385 :

htmlwrite "<p class=""ac"">" & smallinfofont & GetLang("langCommonPage") & " " & mypage & GetLang("langCommonOf") & " " & maxpages
htmlwrite " "
if getconfig("xproductpagingnextprevious")="Yes" then
Call PageNavBarNext (SQL)
else
Call PageNavBar (SQL)
end if
htmlwrite smallinfoend & "</p>"

- and replace to coding below:

if maxpages = 1 then
else
htmlwrite "<p class=""ac"">" & smallinfofont & GetLang("langCommonPage") & " " & mypage & GetLang("langCommonOf") & " " & maxpages
htmlwrite " "
if getconfig("xproductpagingnextprevious")="Yes" then
Call PageNavBarNext (SQL)
else
Call PageNavBar (SQL)
end if
htmlwrite smallinfoend & "</p>"
end if

i think this should work, you can try mine.

diego.
Go to Top of Page

diegomilito
VP-ASP Expert

Argentina
723 Posts

Posted - August 17 2012 :  22:56:33  Show Profile  Reply with Quote
ahhh, forget to mention, the file is shopdisplayproducts.asp.

diego
Go to Top of Page

Kessa
Starting Member

36 Posts

Posted - October 24 2012 :  17:06:34  Show Profile  Reply with Quote
Hi Diego,

Sorry I've not replied until now. Only just had a chance to look at this.

Thanks for the code above. With a very small tweak/correction, it worked a treat, thanks!

(For anyone else reading this - The only small tweak which was needed was to change "if maxpages = 1 " to "if maxpages > 1 " )

Cheers
Kieran
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000