News:

Support the VirtueMart project and become a member

Main Menu

VM 3.0.3 pagination not working right

Started by bboom, January 20, 2015, 10:04:21 AM

Previous topic - Next topic

MAD King

But I need categories to list my products. How else would you list them?
Joomla! 4.4.5
VirtueMart 4.2.12 11012

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

MAD King

That was a great animation on the link.
This pagination problem seems to exists for a while on joomla. Why aren't they able to fix this?
Joomla! 4.4.5
VirtueMart 4.2.12 11012

GJC Web Design

as has been said many many times - fixed on J3.4 .. when it is released stable update
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

MGHollander

It's not about listing your products but it's about creating menu items to those categories. And as sad before. It is fixed in Joomla! 3.4.

For the time being I wrote my own fix.

Create a file in you active templates html directory with the name pagination.php. For example: /template/my-awesome-template/html/pagination.php.
Paste this code in it. It may not be the most beautiful solution, but it worked for me.

Don't forget to remove it after you update to Joomla! 3.4.

<?php
// no direct access
defined('_JEXEC') or die;

function 
pagination_list_render($list)
{
    
// A less beautiful bugfix for pagination in Joomla! 3.3.6 witch will be fixed in Joomla! 3.4
    // http://forum.virtuemart.net/index.php?topic=127793.0
    // More about pagination overrides: https://docs.joomla.org/Understanding_Output_Overrides#Pagination_Links_Overrides
    
$search '/href="(.*)">/';
    
$replace 'href="$1?limitstart=0">';

    
$list['start']['data'] = preg_replace($search$replace$list['start']['data']);
    
$list['pages'][1]['data'] = preg_replace($search$replace$list['pages'][1]['data']);


    
$html "<ul>";
    
$html .= $list['start']['data'];

    
$pages null;
    foreach (
$list['pages'] as $pagenumber => $page) {
        if (
$page['active'] === false && $pagenumber === 2) {
            
$previous preg_replace($search$replace$list['previous']['data']);
        }
        
$pages .= $page['data'];
    }

    
$html .= isset($previous) ? $previous $list['previous']['data'];
    
$html .= $pages;
    
$html .= $list['next']['data'];
    
$html .= $list['end']['data'];
    
$html .= "</ul>";

    return 
$html;

}

MAD King

Thank you, but it did not change anything.
Joomla! 4.4.5
VirtueMart 4.2.12 11012

mediacompadova

I'm using joomla 3.3.6 with virtuemart 3.0.2 and I've tested on my live site. If SEF is enabled, it doesn't work, only with sef disabled it works. Any suggestions or fix?

MAD King

Wait until February 17th. Joomla 3.4 will be released then and it should be fixed, I hope.
Joomla! 4.4.5
VirtueMart 4.2.12 11012

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum