Created
February 10, 2017 16:25
-
-
Save gelanivishal/18e4d81e5d653ac9ea4653f5bbd0f7fc to your computer and use it in GitHub Desktop.
Base image not assigned product list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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