File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,12 @@ public function eavCollectionAbstractLoadBefore(Varien_Event_Observer $event)
4343 */
4444 $ config = Mage::getSingleton ('hackathon_gridcontrol/config ' );
4545
46- // add attributes to collection
47- //foreach ($config->getCollectionUpdates(Hackathon_GridControl_Model_Config::TYPE_ADD_ATTRIBUTE, $blockId) as $entry) {
48- //$event->getCollection()->addAttributeToSelect($entry);
49- //}
46+ // add attributes to eav collection
47+ if ($ event ->getCollection () instanceof Mage_Eav_Model_Entity_Collection_Abstract){
48+ foreach ($ config ->getCollectionUpdates (Hackathon_GridControl_Model_Config::TYPE_ADD_ATTRIBUTE , $ blockId ) as $ entry ) {
49+ $ event ->getCollection ()->addAttributeToSelect ($ entry );
50+ }
51+ }
5052
5153 // join attributes to collection
5254 foreach ($ config ->getCollectionUpdates (Hackathon_GridControl_Model_Config::TYPE_JOIN_ATTRIBUTE , $ blockId ) as $ attribute ) {
Original file line number Diff line number Diff line change 3535 </hackathon_gridcontrol >
3636 </observers >
3737 </core_collection_abstract_load_before >
38+ <eav_collection_abstract_load_before >
39+ <observers >
40+ <hackathon_gridcontrol >
41+ <type >singleton</type >
42+ <class >hackathon_gridcontrol/observer</class >
43+ <method >eavCollectionAbstractLoadBefore</method >
44+ </hackathon_gridcontrol >
45+ </observers >
46+ </eav_collection_abstract_load_before >
3847 </events >
3948 </adminhtml >
4049</config >
You can’t perform that action at this time.
0 commit comments