I think I am going about this right, but maybe not. I created a custom module and wanted to do some logic in the _afterLoad method.
I have these classes:
class Essex_Brakecompound_Model_Brakecompound extends Mage_Core_Model_Abstract
class Essex_Brakecompound_Model_Mysql4_Brakecompound extends Mage_Core_Model_Mysql4_Abstract
class Essex_Brakecompound_Model_Mysql4_Brakecompound_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
I thought that if I added an _afterLoad() in class Essex_Brakecompound_Model_Mysql4_Brakecompound that it would run after a collection is created. This doesn’t seem to happen though.
if I call Mage::getModel(brakecompound/brakecompound)->load(8); the after load runs but it dosn’t after I do Mage::getModel(brakecompound/brakecompound)->getCollection(); I then loop through the collection and the _afterLoad still doesnt run. Am I missing something?
I am trying to add data to each brakecompound object after it is loaded.
Any help is greatly appreciated…