
Problem with the pagination of Virtuemart
From the regular Virtuemart installation, I am not able to change the product pagination display format. My client would like to change the display method to 15 – 30 – 45 and max. 60 products to display other then the default 5, 10, 15, 20, 25, 30.

Modification hacks to the pageNavigation.class.php
So we will need to rewrite the code a bit. We kinda simplify some code for this purpose. So it will look something like this.

pageNavigation.class.php located at administrator/components/com_virtuemart/classes/. Open the php file and look for the below code.Original
for ($i=5; $i <= 30; $i+=5) {
if (empty( $link)) {
$limits[$i] = $i;
} else {
$limits[vmRoute($link.'&limit='.$i)] = $i;
}
}
if (empty( $link)) {
$limits[50] = 50;
} else {
$limits[vmRoute($link.'&limit=50')] = 50;
}
Modification
// change the number of items display which should be divided by 15
// And the maximum number to display is 60
for ($i=15; $i <= 60; $i+=15) {
if (empty( $link)) {
$limits[$i] = $i;
} else {
$limits[vmRoute($link.'&limit='.$i)] = $i;
}
}
// Code Provided by DesignerSandbox.com
Be a link sponsor for this page now
[sponsorbox]
I hope you have enjoyed this post, be sure to subscribe to my rss feed by click the subscribe button at the top.
Good Luck!



Hi – just a little note to say thank you for this article. Very good.
Thanks… worked perfectly… been wracking my brain over this issue for a while.
Thanks for the fix! I've been searching for this snippit for quite some time
Hi Shy, I believe the following link will give you more details on this topic.
http://tny.hk/13