related product problem
Posted: Thu Apr 16, 2015 12:55 pm
Can someone hep me to fix this. I want it look likes category view grid but it came out like that.
OpenCart Community Forum - Discuss shopping cart and e-commerce solutions.
https://forum.opencart.com/
Your Related Products are missing a closing </div> tagmeistralf wrote:i use 1.5.4 and egestas theme. here is my url.
i don't know where to edit this. i already try on css and product.tpl but nothing happen.
http://www.malaysiashoppingvalley.com/i ... duct_id=74
Thank you.
This is my code at product.tpl. Can you show me which one? Because i'm not good in programming and i already try add the </div> but still not work. Thanks for help!wishmedia wrote:Your Related Products are missing a closing </div> tagmeistralf wrote:i use 1.5.4 and egestas theme. here is my url.
i don't know where to edit this. i already try on css and product.tpl but nothing happen.
http://www.malaysiashoppingvalley.com/i ... duct_id=74
Thank you.
Code: Select all
<?php if ($products) { ?>
<div class="box-heading"><span><?php echo $tab_related; ?></span></div>
<div class="box-content"></div>
<div class="box-product product-grid">
<?php foreach ($products as $product) { ?>
<?php
$thumb_width = $this->config->get('config_image_related_width');
$thumb_height = $this->config->get('config_image_related_height');
?>
<div>
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>" style="<?php echo ($thumb_height < 150) ? 'line-height: 150px' : ''; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } else { ?>
<div class="image">
<span class="no-image" style="<?php echo ($thumb_width < 150) ? 'width: 150px' : 'width: '.$thumb_width.'px'; ?>; <?php echo ($thumb_height < 150) ? 'line-height: 150px' : 'line-height: '.$thumb_height.'px;'; ?>">
<img src="image/no_image.jpg" alt="<?php echo $product['name']; ?>" /></span>
</div>
<?php } ?>
<div class="name" style="width: <?php echo $thumb_width; ?>px"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
<?php } ?>
<!--<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>-->
<div class="description"><?php echo $product['description']; ?></div>
<!--<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<div><span class="price-fixed"><?php echo $product['price']; ?></span></div>
<?php } else { ?>
<div class="special-price"><span class="price-old"><?php echo $product['price']; ?></span><span class="price-fixed"><?php echo $product['special']; ?></span></div>-->
<?php } ?>
</div>
</div>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/egestas/image/icons/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<div class="details">
</div>
</div>
<?php } ?>
Code: Select all
<?php if ($products) { ?>
<div class="box-heading"><span><?php echo $tab_related; ?></span></div>
<div class="box-content"></div>
<div class="box-product product-grid">
<?php foreach ($products as $product) { ?>
<?php
$thumb_width = $this->config->get('config_image_related_width');
$thumb_height = $this->config->get('config_image_related_height');
?>
<div>
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>" style="<?php echo ($thumb_height < 150) ? 'line-height: 150px' : ''; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } else { ?>
<div class="image">
<span class="no-image" style="<?php echo ($thumb_width < 150) ? 'width: 150px' : 'width: '.$thumb_width.'px'; ?>; <?php echo ($thumb_height < 150) ? 'line-height: 150px' : 'line-height: '.$thumb_height.'px;'; ?>">
<img src="image/no_image.jpg" alt="<?php echo $product['name']; ?>" /></span>
</div>
<?php } ?>
<div class="name" style="width: <?php echo $thumb_width; ?>px"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
<div class="description"><?php echo $product['description']; ?></div>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/egestas/image/icons/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<div class="details">
</div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>