I have some thousand products and want to find all products without an image. I tried to search for (no image) in the admin products grid, but no result. How can I make an S
There are both ways to do:
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('small_image',array('notnull'=>'','neq'=>'no_selection'));
Above code should work but in my case it was not working. So i tried following:
$products = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('small_image',array('neq'=>'no_selection'));
Good Luck!