magento出力関連製品
901 ワード
次のようになります.
参照先:http://stackoverflow.com/questions/8681945/how-to-display-related-products-in-ajax-pop-up-in-magento
<?php
$related= $_product->getRelatedProducts();
foreach($related as $_item):
$_item = $_item->load($_item->getId());
//echo $this->htmlEscape($_item->getName()).': <a href="'.$_item->getProductUrl().'"><img src="'.$_item->getImageUrl().'" width="80" height="80" /></a>';
echo $this->htmlEscape($_item->getName()).': <a href="'.$_item->getProductUrl().'"><img src="'.Mage::helper('catalog/image')->init($_item, 'thumbnail')->resize(80, 80).'" width="80" height="80" /></a>';
endforeach;
?>
参照先:http://stackoverflow.com/questions/8681945/how-to-display-related-products-in-ajax-pop-up-in-magento