Related products on the product page are displaying wrong images.

Can anyone please let know why it is happening?

You can see last 4 products have same images even though they are different products.

enter image description here

  • It is hard to tell the reason without seeing the actual implementation..One reason could be the variable used to contain image URL is not reset inside loop when there is no image, resulting in displaying the same for rest of the products..Can you share the code? – Techroshni Apr 21 '15 at 11:25
  • <a href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(110) ?>" width="110" height="140" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a> <p class="product-brand"><?php echo $_item->getAttributeText('brand'); ?></p> <p class="product-brand"> <?php echo $this->htmlEscape($_item->getProductCode());?> <?php echo $this->getPriceHtml($_item, true, '-related') ?> – Kumar Apr 21 '15 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.