How to rewrite Collection?

Posted by latvian on Stack Overflow See other posts from Stack Overflow or by latvian
Published on 2010-03-11T16:58:17Z Indexed on 2010/03/16 21:21 UTC
Read the original article Hit count: 263

Filed under:

Hi,

I would like to rewrite the collection that is returned by Mage::getResourceModel('sales/order_collection');

My goal is to rewrite this resource so that i can filter out the collection for particular Store.

Any ideas on how to do it? I tried directly rewrite collection of the sales/order module but no success. I was able to rewrite sales/order itself but not the collection, because when i call getCollection() it returns "Fatal error: Call to undefined method Mage_Sales_Model_Mysql4_Order::getCollection() "

Any idea will help.

Thank you,

Margots

© Stack Overflow or respective owner

Related posts about magento