News:

Support the VirtueMart project and become a member

Main Menu

Pagination broken in category 0(root)

Started by Studio 42, October 18, 2017, 15:49:24 PM

Previous topic - Next topic

Studio 42

HI,
I use a test site with VM 3.2.4 and pagination is really strange in the home page.
Each page the pagination is multiplied *2
eg when you go in this page http://pro.st42.fr
pagination for page
2 : http://pro.st42.fr/results,25-48
3 : http://pro.st42.fr/results,49-96
...
99: http://pro.st42.fr/results,2353-4704
Yes 2353-4704 for last page 99!

Studio 42

Quote from: Studio 42 on October 18, 2017, 15:49:24 PM
HI,
I use a test site with VM 3.2.4 and pagination is really strange in the home page.
Each page the pagination is multiplied *2
eg when you go in this page http://pro.st42.fr
pagination for page
2 : http://pro.st42.fr/results,25-48
3 : http://pro.st42.fr/results,49-96
...
99: http://pro.st42.fr/results,2353-4704
Yes 2353-4704 for last page 99!
I checked exactly and pagination have pagination+ pagination eg 24(25-48) then 48 (49-96),72(73-144),96...

ermes

I have same problem. There isn't a fix yet?

Studio 42

You need to set same pagination in menu link and in Virtuemart default config for pagination and it should work

ermes


Studio 42

It not work better. I tried all settings
So it's a bug.

ermes

Yes, I also tried but did not work. I asked you the screen shot just to see if I put the correct parameters. Hopefully they will solve it soon!

Milbo

For me it looks like the max page is set in the joomla pagination to 100, so the last page shows then the remaining products.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ermes

And have you fixed it somehow? If yes, can you show me as?

Studio 42

pagination is set to 24
See page 3 it should be 48-72 and its 48-96, each new pagination is x2 excluded first page.
page 1 1-24 = 24
page 2 24-48 = 24
page 3 48-96 = 48(24+24)
page 4 73-144 = 72(24+24+24)
....
If you go to page 3 for eg. number of result is set to 72
And trying to go back to 24 do not work.


ermes


Milbo

What do you set as pagination sequence? and do you have the same effect also in the Backend?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

I have set all paginations to 24,admin, front ... only max items with image is set to 48

Milbo

I think I found it, the error was in the router


// Joomla replace before route limitstart by start but without SEF this is start !
if ( isset($query['limitstart'] ) ) {
$limitstart = (int)$query['limitstart'] ;
unset($query['limitstart']);
}
if ( isset($query['start'] ) ) {
$start = (int)$query['start'] ;
unset($query['start']);
}
if ( isset($query['limit'] ) ) {
$limit = (int)$query['limit'] ;
unset($query['limit']);
}

if ($start !== null &&  $limitstart!== null ) {
vmdebug('Pagination limits $start !== null &&  $limitstart!== null',$start,$limitstart);
//$segments[] = $helper->lang('results') .',1-'.$start ;
} else if ( $start>0 ) {
//For the urls leading to the paginated pages
// using general limit if $limit is not set
if ($limit === null) $limit= vmrouterHelper::$limit ;
$segments[] = $helper->lang('results') .','. ($start+1).'-'.($start+$limit);
} else if ($limit !== null && $limit != vmrouterHelper::$limit ) {
//for the urls of the list where the user sets the pagination size/limit
$segments[] = $helper->lang('results') .',1-'.$limit ;
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

ermes