How to Display only 3 related product on product view page, Magento? -


i displaying related products in content block of layout in product view page. code in catalog.xml is:

<reference name="content">      <block type="catalog/product_list_related" name="catalog.product.related" after="-" template="catalog/product/list/related.phtml"/> </reference> 

now, related products displayed in product view page, want display 3 products, should do? please, can ??

you need edit template file catalog/product/list/related.phtml , limit loop iterate through 3 products.

for example:

    ...     <?php $i = 0; ?>     <?php foreach($this->getitems() $_item): ?>         <?php if($i++ == 3) break; ?>         ... 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -