Sometimes there is no id available for loading a model. If thats the case, the following code might help out. It loads a collection by an attribute like name or sku.
1 |
$collectionData = Mage::getModel('modelname')->getCollection()->addFieldToFilter('attribute', 'attribute value'); |
Afterwards, it is possible to iterate over the…