Re: Products Pagination - Support Thread
I've just submitted v2.1.0 of Products' Pagination to the Zen Cart moderators for review and will post back here when it's available for download (https://www.zen-cart.com/downloads.php?do=file&id=1199).
This release contains changes for the following GitHub issues:
#15: (Future proofing) Use zc157 files as the core/template change-basis; add check so that the plugin can be removed without additional changes.
#16: Use correct variable name in the plugin's split-page class.
#17: Correct various PHP notices and processing errors in the plugin's observer-class.
#20: Move pagination HTML out of class-file to template.
#24: zc157 interoperability, force the 'split_page_results.php' class to load that second time.
Thanks to @torvista for all his help in getting this updated!
Re: Products Pagination - Support Thread
Quote:
Originally Posted by
lat9
I've just submitted v2.1.0 of Products' Pagination to the Zen Cart moderators for review and will post back here when it's available for download (
https://www.zen-cart.com/downloads.php?do=file&id=1199).
This release contains changes for the following GitHub issues:
#15: (Future proofing) Use zc157 files as the core/template change-basis; add check so that the plugin can be removed without additional changes.
#16: Use correct variable name in the plugin's split-page class.
#17: Correct various PHP notices and processing errors in the plugin's observer-class.
#20: Move pagination HTML out of class-file to template.
#24: zc157 interoperability, force the 'split_page_results.php' class to load that second time.
Thanks to @torvista for all his help in getting this updated!
Now available for download.
Re: Products Pagination - Support Thread
Quote:
Originally Posted by
lat9
v2.1.0 of Products' Pagination
Thanks..
I hit a white page after installing.
ZC 1.5.6c PHP7.3.11
my template
I don't use device detection and deleted Mobile Detect to keep it from sneaking in. After editing it out, all works as expected.
I have some ideas running around I want to play with before uploading to my live site.
This the change I did. Not tested with anything other then my template.
includes/classes/observers/class.products_pagination_observer.php
Code:
if ((!class_exists('Mobile_Detect')) && (file_exists(DIR_WS_CLASSES . 'Mobile_Detect.php'))) {
require_once DIR_WS_CLASSES . 'Mobile_Detect.php';
}
if (class_exists('Mobile_Detect')) {
$detect = new Mobile_Detect();
$this->isTablet = $detect->isTablet() || (isset($_SESSION['layoutType']) && $_SESSION['layoutType'] === 'tablet');
$this->isMobile = (!$detect->isTablet() && $detect->isMobile()) || (isset($_SESSION['layoutType']) && $_SESSION['layoutType'] === 'mobile');
$this->isDesktop = !($this->isTablet || $this->isMobile);
}
Re: Products Pagination - Support Thread
Thanks, @davewest, others might find those edits useful! Please note that the plugin's readme states:
Starting with v2.0.0, you also control whether the plugin's pagination links are active when your site is viewed by a mobile device. To enable that handling, the plugin makes use of the presumed pre-existing file /includes/classes/Mobile_Detect.php and is also aware of the layoutType handling provided by Zen Cart 1.5.5's responsive_classic template.
Re: Products Pagination - Support Thread
I'm having an issue with products pagination.
Site is running 1.5.6a and was on products pagination version 2.0.0 but is now on 2.1.0 and running PHP 7.4
Before installing the module 'All Products' page showed 62 pages. After installation it shows 273 pages. 63 to 273 are all pages with no products.
I also have dynamic filter installed which makes edits to some of the same files as products pagination, but the page count is correct when pagination module isn't installed, so not convinced it's related.
Any suggestions on where to start looking for the cause of this?
Re: Products Pagination - Support Thread
I resolved the issue. It was related to Dynamic Fillter mod
Re: Products Pagination - Support Thread
Thanks for the come-back, @streilitzia. I was unable to come up with a reason for Products' Pagination to produce that result.
Re: Products Pagination - Support Thread
I think I may have spotted a typo in the latest version (2.1.0): line 82 of /includes/classes/split_page_results.php reads
Code:
$pos_order_by = strrpos($query_lower, ' order by', $pos_from);
Should that be
Code:
$pos_order_by = strpos($query_lower, ' order by', $pos_from);
?
Re: Products Pagination - Support Thread
I just did some googling and strrpos isn't a typo (oops - my mistake), but using it instead of strpos is a change from both version 2.0 of this plugin and the standard Zen Cart code, so I guess it's not completely stupid for me to check that it's not a mistake..?
Re: Products Pagination - Support Thread
Quote:
Originally Posted by
planetjune
I just did some googling and strrpos isn't a typo (oops - my mistake), but using it instead of strpos is a change from both version 2.0 of this plugin and the standard Zen Cart code, so I guess it's not completely stupid for me to check that it's not a mistake..?
While that class needs a teeny bit of update to align with the now-current zc157b implementation, the use of strrpos is consistent between the base Zen Cart 1.5.7+ distribution and the modification provided by Products Pagination.