Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9127539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:18:18+00:00 2026-06-17T07:18:18+00:00

I use this tutorial and display products on the basis of multiple categories but

  • 0

I use this tutorial and display products on the basis of multiple categories but now I am getting in issue is that the pager tool bar not working on that.
My block code is :

<reference name="content"> 
    <block name="mymodule" type="mymodule/product_listcategories"  template="catalog/product/list.phtml">
        <action method="setCategories">
            <ids>2,3,4</ids>
        </action>
    </block>
</reference>

I also add this code with above

<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>
    <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>

It display toolbar but the toolbar is not working (limit,orderby).
My block code is

class Mymodule_Block_Product_Listcategories extends Mage_Catalog_Block_Product_List
{
    protected function _getProductCollection()
    {

        $this->_productCollection = Mage::getModel('catalog/product')->getCollection();
        $this->_productCollection->addAttributeToSelect('*');

        if($this->getCategories()!="")
            $this->_productCollection->addCategoriesFilter($this->getCategories());

            return $this->_productCollection;
        }
    }
}

Does anyone know where is the problem? I think I’m missing some code for the pager? Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:18:20+00:00Added an answer on June 17, 2026 at 7:18 am

    After search so much i got a solution.I didn’t know whether it right or wrong way but it solve my problem.On my block i create intance of
    $cpBlock = $this->getLayout()->getBlockSingleton('Mage_Catalog_Block_Product_List_Toolbar');
    and access the pager core function like $this->_itemPerPage = $cpBlock->getLimit(); .In the above code itemperpage is the total no of items to be displayed on listing page.This code work if you create custom module and extend you block from list block.Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this tutorial for sign my apk link but I have stopped on
My problem with restore my purchases. I use this tutorial for integrate IAP to
I want to Embed SVG into XUL. I tried to use the this tutorial
I was following this tutorial . I need to use a php file's ouput
I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
At a tutorial on using SQLite databases. Within this tutorial, it suggested to use
use this website a lot but first time posting. My program creates a number
I'm using this tutorial at the moment. (I believe my issue is related to
I have a chart that I use to display a graph. To display the
I'm trying to use this tutorial to create a jQuery Slider with a custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.