Requrement: We have a bunch of products with and without images. We only need to display products with images in the frontend.
What I did: I have tried almost all the SO resources like:
Filter products without images on Magento frontend
How can I find all products without images in Magento?
Hide Products without images magento
and their various combinations with no luck.. I think something changed in the new version of Magento. I am using version 1.8.1.0
Is somebody able to shed some lights here?
UPDATE: On my debugging, I found out that
->addAttributeToFilter('small_image', array('neq' => 'no_selection'))
really worked. But an error occurs in layered price filter. I was thinking this is not working earlier.I am getting the error similar to: Magento 1.7 price filter error (Column not found: 1054 Unknown column 'e.min_price' in 'where clause')...
According to Royw's answer to the above question, I believe, we need to edit the file: Mage/Catalog/Model/Layer/Filter/price.php