Avatar of kbit
kbit

asked on 

Magento pagination product total display issue

Hi all,

I’m running Magento v1.7.0.2.

Let’s say there are 14 products associated with a particular category. If I click on that category, Magento does the pagination correctly and shows the first 8 products, with 3 products per row. It also says “Items 1 to 8 of 8 total”.

If I click on the second page, it correctly shows me 6 products, 3 per row. This time it says “Items 9 to 14 of 6 total”.

Can someone please help me fix this issue and have it reading “Items 1 to 8 of 14 total” and Items 9 to 14 of 14 total” respectively? I have no idea which PHP/XML file to edit and what changes to make.

Many thanks
E-CommercePHP

Avatar of undefined
Last Comment
kbit
Avatar of kbit
kbit

ASKER

In Toolbar.php and Pager.php I've changed

    public function getTotalNum()
    {
        return $this->getCollection()->getSize();
    }

Open in new window


to

    public function getTotalNum()
    {
        return $this->getCollection()->count();
    }

Open in new window


and flushed the cache but still no change.
ASKER CERTIFIED SOLUTION
Avatar of kbit
kbit

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo