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

Avatar of undefined
Last Comment

8/22/2022 - Mon

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

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

Open in new window


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

Open in new window

and flushed the cache but still no change.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy