Magento view related products in list.phtml
I have the following requirement;
I want to show a products configured related products on the category listing page (list.phtml). I figured I could make some call on the list.phtml inbetween the for each loop for each product using the [b]$_product[/b] variable but I can't seem to populate the relatedProductCollection sorry new to all this is it even possible.
<?php foreach ($_productCollection as[b] $_product[/b]):?>
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?>last<?php endif; ?>" >
<div class="product-s开发者_StackOverflow社区hop">
<div class="f-fix">
<?php $product->getRelatedProductCollection(); ?>
</li>
<?php endforeach; ?>
$product has been used to call the getRelatedProductCollection function.
but,
In that foreach loop you have taken it as $_product.
Can you see the difference ??
Underscore is missing. This is taken from your code. Make the variable same in both the places and try.
精彩评论