Welcome, Guest ( Customer Panel | Login )




 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-CART Expert

Argentina
779 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-CART Expert

Argentina
779 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
0 Item(s)
$0.00