0

I'm working on this website. The related products are displaying, but the image is not coming below the title. It is moving a bit right. I tried including <br />. But the look will blow away. Please suggest some modification so that the image comes exactly below. the code goes like this

<?php 
    $related_prods = $_product->getRelatedProductIds();
?>
<ul>
    <?php
    foreach($related_prods as $related){
    ?>
    <li style="display: inline; width: 100px; height: 100px;">
    <?php    $_rel = Mage::getModel('catalog/product')->load($related);
        echo $_rel->getName()."\r\n"."\r\n"."\r\n";

    ?>
        <a href="<?php echo $_rel->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_rel->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_rel, 'thumbnail')->resize(84, 81) ?>" width="120" height="120" alt="<?php echo $this->htmlEscape($_rel->getName()) ?>" /></a>
        &nbsp;
        &nbsp;
    </li>
<?php
}
?>
</ul>

Another is that, in that page, in additional information the product is showing the sku code of product. How to make it invisible in admin page.

2
  • increase li width and use float: left for all the li's except last.
    – Kalpesh
    Commented Apr 25, 2013 at 11:53
  • where did you put <br/>? Commented Apr 25, 2013 at 12:34

1 Answer 1

1
.product-image{
    clear:both;
    float:left;
    margin-top:30px;
}

Hope that helps

:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.