Author Topic: Pagination Bug?  (Read 2818 times)

razor7

  • Jr. Member
  • **
  • Posts: 336
    • MGSCreativa - Professional VM!
Pagination Bug?
« on: June 24, 2009, 22:15:50 pm »
Hello...in file pageNavigation.class.php on line 127 the "previous" link is calculated this way
Code: [Select]
$page = $this_page * $this->limit;
so far this creates this links
Quote
for page 2, and 10 products per page, the result is 20
for page 3, and 10 products per page, the result is 30
for page 4, and 10 products per page, the result is 40

So if I click the "previous" link the vm url get this values
Quote
for page 2, ...&limit=10&limitstart=20...
for page 3, ...&limit=10&limitstart=30...
for page 4, ...&limit=10&limitstart=40...

But the previous link should be
Quote
for page 2, ...&limit=10&limitstart=0...
for page 3, ...&limit=10&limitstart=10...
for page 4, ...&limit=10&limitstart=20...

I suggest changing the calculation sentence for this one.
Code: [Select]
$page = ($this_page - 2) * $this->limit;
Best regards!
MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store