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 8788481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:09:17+00:00 2026-06-13T22:09:17+00:00

I have a very complex problem (at least i think so) implementing a custom

  • 0

I have a very complex problem (at least i think so) implementing a custom module in Magento. I have created a module that displays products of a single main category in default catalog. For example,

root catalog
  -main category
     -cat 1
     -cat 2
       -sub category 1
     -cat 3

So what i need to do is, display all these categories in a drop down list and when you select any one category all its products will be loaded. Seemed pretty strait forward. I added the code to display this sort by category drop down list in my module’s list.phtml file. Instead of loading default product collection I loaded the main category and then fetched all its sub category and populated the drop down list. And I fetched the product collection of the selected category from the drop down list. My code is like this:

$baseCategory = Mage::getModel('catalog/category')->load(62);
$_productCollection = $baseCategory->getProductCollection()->addAttributeToSelect('*');

The products are loaded alright but the problem arises with pagination. the code for pagination goes like this:

$this->getToolbarHtml();

I have used the $this->getToolbarHtml(); instead of $this so in pagination also I need to change the object. It’s not working due to that I think. The toolbar is shown but regardless of number of products per page selected it always displays all products. Can anyone tell me please how to get the toolbar working with my changed code in list.phtml file?

  • 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-13T22:09:18+00:00Added an answer on June 13, 2026 at 10:09 pm

    I’ve found a different approach to the task i wanted to accomplish. So instead of creating a new module i created a new theme and so just overridden the list.phtml file. There is no need to use the above code anymore. And since i am using the default catalog object the pager is also loaded alright.

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

Sidebar

Related Questions

Here is the problem: I have a very complex plugin that does lots of
I've worked on projects that have very complex XML configuration, and one problem that's
We have a very complex Oracle package here (over 4,100 lines of code) that's
I have a very complex task - create a software that imports XMl files
I have a tricky problem. I have a very complex view in MS SQL
I have a very complex Linq to SQL query that returns a result set
I have a very complex issue that Me and my coworker have been discussing
I have a very complex parsing problem. Any thoughts would be appreciated here. I
The problem: we have a very complex search query. If its result yields too
Actually, I have a very complex problem, but I have narrowed it down here

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.