what are parameters to show related products

1)Go to System -> Index Management
Select All checkboxes
Select ‘Reindex Data’ from Actions selection list.

2)Check related product status is enabled.
Check visibility status set “Catalog” or “Catalog Search”
If everything is fine, check the inventory of related products.Stock should be greater than 0.
Last thing, related products must be include a category. Click “categories” link to check and see if the product added in a category.

3) If any of this are not working, go to catalog.xml and find this:

1
2
3
<reference name="right">
          <block type="catalog/product_list_related" name="catalog.product.related"  template="catalog/product/list/related.phtml"/>
</reference>

if is commented, uncomment it. If you want to display the related products in the product view page you have to change the reference name=”right” with reference name=”content”, becouse the related products are showed by default in right column layout and you have to move it to content.

If your layout is changed to 2 columns left the related products will not be visible.

4) If nothing worked by now you have tot do it by your self using this code as sample:

1
2
3
4
5
6
$related_prods = $_product->getRelatedProductIds();
foreach($related_prods as $related)
{
    $_rel = Mage::getModel('catalog/product')->load($related);
    echo $_rel->getName() . " " . $_rel->getSku();
}

Insert the code above in app/design/frontend/default/your_theme/template/catalog/product/view.phtml

Let us know what step helped you.

Leave a comment