Filter Products By Attribute With NULL values In Magento

Monday, 30. September 2013

One little tip for someone who wants to select a set of items or products in Magento based on attribute with a NULL value.

$collection = Mage::getModel('catalog/product')->getCollection()
    ->addAttributeToFilter('ATTRIBUTE_CODE', array('null' => true)) 

Leave a Reply

You must be logged in to post a comment.