MAGENTO 1.X – REMOVE ITEMS FROM A COLLECTION WHEN ITERATING


Sometimes you may need to remove items from a collection (eg: products) after it was loaded, or when you are iterating it.

The following example shows you how can you remove non enabled products items from a product collection. The respective collection have to be inherited from Varien_Data_Collection.