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

  • Home
  • SEARCH
  • 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 802945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:40:46+00:00 2026-05-14T23:40:46+00:00

I’m trying to add some custom filter methods to my magento module. I though

  • 0

I’m trying to add some custom filter methods to my magento module. I though it would be simple but I can’t figure out why it’s not working.

My model which extends the catalog/product class contains this:

public function filterProdType($prod_id)
{
   $this->addAttributeToFilter('attribute_set_id', $prod_id); 

}

Then in my template I have this:

 $collection = Mage::getModel('configurator/product')->getCollection()->addAttributeToSelect('*');


 $collection->filterProdType(50)->addAttributeToFilter('type_id', 'bundle');

 foreach ($collection as $item){
     echo $item->getName() . ', ';
 }

Just to try things out.

But I don’t get any results, no error, and it doesn’t finish rendering the page (missing footer).

When I do this instead, it works:

 $collection = Mage::getModel('configurator/product')->getCollection()->addAttributeToSelect('*');


 $collection->addAttributeToFilter('attribute_set_id', 50)->addAttributeToFilter('type_id', 'bundle');

 foreach ($collection as $item){
     echo $item->getName() . ', ';
 }

I’m just wondering what I’m missing.

UPDATE:

I didn’t realize error reporting was turned off, after turning it on I get the error:

Fatal error: Call to undefined method 
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection::filterProdType() 

I assumed after instantiating $collection using my custom model, it would find my new method.

  • 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-05-14T23:40:47+00:00Added an answer on May 14, 2026 at 11:40 pm

    When rendering “stops” like that it almost always means Magento encountered a PHP error while trying to include in the phtml file. Take a look at your PHP and/or Apache error logs and see what PHP is complaining about. There’s too many variables to troubleshoot things without that information.

    If you absolutely can’t get at your error logs, delete your entire phtml file and then add code back line by line, block by block, until you can reproduce your problem, and then figure out what’s wrong with the last bit you just added.

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

Sidebar

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.