我想获得所有产品但只展示一种产品,我该怎么办?这是我在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 ?>