The new version of Virtuemart 4.0.20 is written with errors - probably the sorting and pagination is incompatible with the Joomla 4 standard.
Pagination works only in the base version of Joomla 4. External plugins like 4SEF stopped working normally with this.
Pagination links are generated normally, but there is no way to go to the next category page.
temporary solution:
administrator/components/com_virtuemart/models/product.php
after:
$limitStart = vRequest::getInt ('limitstart', 0,'GET');
add:
$limitStart = $app->input->getInt('limitstart');
I can confirm adding this line, also makes the pagination working again in Joomla 3. So not an Joomla 4 only issue.
Same with VM 4.0.22 :-\
Same here.
VirtueMart 4.0.22 10864 and Joomla! 3.10.11.
Quote from: hazael on May 05, 2023, 14:40:31 PM
temporary solution:
administrator/components/com_virtuemart/models/product.php
after:
$limitStart = vRequest::getInt ('limitstart', 0,'GET');
add:
$limitStart = $app->input->getInt('limitstart');
Thank you.
Quote from: hazael on May 05, 2023, 14:40:31 PM
temporary solution:
administrator/components/com_virtuemart/models/product.php
after:
$limitStart = vRequest::getInt ('limitstart', 0,'GET');
add:
$limitStart = $app->input->getInt('limitstart');
It would be nice, if this fix gets added to the core.
This thread needs to be pinned for non working pagination solution. Thanks to hazael it is working again.
Quote from: hazael on May 05, 2023, 14:40:31 PM
temporary solution:
administrator/components/com_virtuemart/models/product.php
after:
$limitStart = vRequest::getInt ('limitstart', 0,'GET');
add:
$limitStart = $app->input->getInt('limitstart');
Hmm, the GET as third parameter, says where to get the info. What happens, if you remove it? If you use
$limitStart = vRequest::getInt ('limitstart', 0);
Does it work then? vRequest::getInt ('limitstart', 0,'POST'); would be for POST.
Quote from: Milbo on August 21, 2023, 20:48:24 PM
Quote from: hazael on May 05, 2023, 14:40:31 PM
temporary solution:
administrator/components/com_virtuemart/models/product.php
after:
$limitStart = vRequest::getInt ('limitstart', 0,'GET');
add:
$limitStart = $app->input->getInt('limitstart');
Hmm, the GET as third parameter, says where to get the info. What happens, if you remove it? If you use
$limitStart = vRequest::getInt ('limitstart', 0);
Does it work then? vRequest::getInt ('limitstart', 0,'POST'); would be for POST.
I do not know. I used hazael's fix and it worked on J4.3.3 and VirtueMart 4.2.0 10905
Today I installed the latest version 4.2.2 10908 - why is this important fix still missing? Why are we ignored? It's just a stupid piece of code
The proposed POST option does not work. This component still does not work as it should.
Quote from: hazael on September 13, 2023, 11:09:45 AM
Today I installed the latest version 4.2.2 10908 - why is this important fix still missing? Why are we ignored? It's just a stupid piece of code
The proposed POST option does not work. This component still does not work as it should.
I also have this issue! Fixed it by using the solution defined above!
Same with Joomla! 3.10.12 + VirtueMart 4.2.4 10922 :(
hello, is there a solution?
I have upgrade to last version of virtuemart 4.2.2 in Joomlaz 3 and pagination is not working.
what I have to do?
thanks
Had the same problem today with Virtuemart 4.2.4
Hazael's solution fixed it so far. It would be nice, if this would be fixed in a future version.
When I removed the third parameter 'GET', it resolved the issue.
$limitStart = vRequest::getInt ('limitstart', 0);
Something has definitely changed in VM 4.4.1 11099 along with Joomla 5.2.1
I tried the original code from Hazael as well as the remove 'GET' as mentioned by yaniv1, and neither of the options worked.
Obviously there is still something conflicting - or ?? - somewhere. But it's not working for me.
This code will not work properly - SEF Links will be generated incorrectly.
echo $this->vmPagination->getPagesLinks();
This variable when calling for the first time, it generates incorrect pagination links. However, calling it a second time fixes the issue.
Cause:
VirtueMart dynamically generates pagination data on the first call, meaning the links may not be fully initialized until after the first execution.
Solution:
To ensure correct pagination links, store the result in a variable before using it.
In you template: /com_virtuemart/category/default.php
This solution will work correctly - the SEF links will generate correctly
$this->vmPagination->getPagesLinks(); // Trigger pagination generation
$pagination = $this->vmPagination->getPagesLinks(); // Retrieve correct links
echo $pagination;