4

We have created pages for 4 categories in the backend under Catalog > Manage categories. So there are 4 categories and are linked to 2columns-left.phtml (I think this is a default Magento page).

The pages work fine overall, and are linked under URLS: /products/[category-name].html

The problem however, is that we are not seeing pagination for the pages/categories. 3 of the categories have more than 10 items and when working on this issue we have selected "Show: 5", so there definitely should be pagination.

What could cause that we don't see this?

Also, after Googling for quite a bit, I tried adding $this->getChildHtml('product_list_toolbar_pager') and $this->getChildHtml('pager') to the page. The pager html returns nothing and product_list_toolbar_pager returns the following error:

Fatal error: Call to a member function getSize() on a non-object in /mnt/projects/online-shop/www/app/design/frontend/refresh/refresh-child/template/page/html/pager.phtml on line 34

Line 34 is:

if($this->getCollection()->getSize()):

So to me it seems like the collection hasn't been loaded correctly..

We are otherwise inexperienced with Magento and don't know where to start looking.

Magento ver. 1.9.0.1

  • I guess you have reindexed your data and cleared the cache?! – Stefan Gregori May 18 '15 at 16:31
  • That is correct – Richard May 19 '15 at 7:03
5

You have to add this block as a child block of list

<block type="page/html_pager" name="product_list_toolbar_pager"/>

it look like that then the paging will work

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                            <block type="page/html_pager" name="product_list_toolbar_pager"/>
    </block>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.