Skip to content

Instantly share code, notes, and snippets.

@gelanivishal
Created February 10, 2017 16:25
Show Gist options
  • Save gelanivishal/18e4d81e5d653ac9ea4653f5bbd0f7fc to your computer and use it in GitHub Desktop.
Save gelanivishal/18e4d81e5d653ac9ea4653f5bbd0f7fc to your computer and use it in GitHub Desktop.
Base image not assigned product list
<?php
require_once ( "app/Mage.php" );
Mage::app();
umask(0);
//echo Mage::getBaseUrl();
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
//exit;
$_productCollection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort('created_at', 'DESC')
->addAttributeToSelect('*')
->load();
foreach ($_productCollection as $_product) {
$imageUrl = Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getImage());
if($imageUrl == $url.'media/catalog/product/' || $imageUrl == $url.'media/catalog/product/no_selection'){
echo Mage::getBaseUrl().'admin/catalog_product/edit/id/'.$_product->getId().'->'.Mage::getBaseUrl().'catalog/product/view/id/'.$_product->getId();
echo '<br/>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment