<h3>Product collection Does'nt Have Images</h3>
<?php
$_products = Mage::getModel('catalog/product')
       ->getCollection()
       ->addAttributeToSelect('*')
       ->addAttributeToFilter(array(
       array (
       'attribute' => 'image',
       'like' => 'no_selection'
       ),
       array (
       'attribute' => 'image',
       'null' => true
       ),
       array (
       'attribute' => 'image', 
       'eq' => ''
       ),
       array (
       'attribute' => 'image', 
       'nlike' => '%/%/%'
       ),
       ));
foreach($_products as $_topproduct){
       $modell = Mage::getModel('catalog/product');
       $topproduct_id = $_topproduct->getId();
       $_topproduct = $modell->load($topproduct_id);
       $_img=Mage::getModel('catalog/product')->load($topproduct_id);
       ?>
       <div class="product">
              <div class="no-image-product-id"><?php echo $_topproduct->getId(); ?></div>
       </div>
       <?php
       }
?>

Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *