Skip to main content
2 of 2
added 4 characters in body

It turned out that we had created a local version of the default related.phtml file which was being used as the template for the related items block. In this code there is this line within a loop:

$itemBlock = $this->getChild('catalog.product.related.item')->setItem($_item)->setPosition($i);

Notice the $i variable near the end of the line.

This variable was not being incremented elsewhere in the code. I added $i = 0; before the loop and $i++; in the appropriate location within the loop. With the $i variable now incrementing, the repeating item problem has been resolved.