如何在Magento中获取所有产品图片?

时间:2013-10-26 08:31:26

标签: magento

我想获得所有产品但只展示一种产品,我该怎么办?这是我在list.phtml中的代码:

<?php foreach ($_productCollection as $_product): ?>
<div class="product-panel">
    <div class="pro-content">
        <div class="product-1">
            <?php//Product Image ?>
                <div class="pro-img">
                     <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
                         <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
                     </a>    
                </div>
                <p class="text-2">
                    <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
                </p>
                <p class="p-price">
                    <?php echo $this->getPriceHtml($_product, true) ?>
                </p>
        </div>
    </div>
</div>
<?php endforeach ?>

0 个答案:

没有答案