getImage() == "no_selection" && $product->getTypeId() == "configurable") {
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
foreach ($simple_collection as $simple_product) {
echo $simple_product->getSku() . " - " . $simple_product->getName() . " - " . Mage::helper('core')->currency($simple_product->getPrice()) . "\n";
if ($simple_product->getImage() != "no_selection") {
$imageUrl = $simple_product->getThumbnailUrl();
break;
}
}
} else {
$imageUrl = $product->getThumbnailUrl();
}
?>
|
getShortDescription(); ?> |