Having some issues with an observer on the EAV product collection event for the Adminhtml product grid.

I am simple trying to add 2 new columns into the grid. Heres my XML:


This calls these 2 methods:

public function onBlockHtmlBefore(Varien_Event_Observer $observer) {
    /** @var Mage_Adminhtml_Block_Widget_Grid $block */
    $block = $observer->getBlock();
    if (!isset($block)) return $this;

    if ($block->getType() == 'adminhtml/catalog_product_grid') {



public function onEavLoadBefore(Varien_Event_Observer $observer) {
    /** @var Mage_Eav_Model_Entity_Collection_Abstract $collection */

    $collection = $observer->getCollection();
    if (!isset($collection)) {
        return $collection;




The columns get outputted fine, but for some reason the data of season and gender doesn't get appended to the collection. After step debugging it seems that this observer doesn't get the collection at all or should i say there are no items in the collection.

Have any ideas? I assume that when i have the collection successfully and update the attributes being selected that they will show in the Grid for each product?


  • I had similar problem, but it seems to work if I took the event out of <adminhtml> for some reason.
    – frostshoxx
    Commented Jun 2, 2017 at 23:13

1 Answer 1


My options were inverted and therefore the value wasn't matching the label

  • Now it is working? Commented Feb 6, 2015 at 12:20
  • Yes it is except filtering unfortunately
    – Tom Burman
    Commented Feb 6, 2015 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.