VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: nagohon on October 30, 2012, 11:22:29 AM

Title: Related products in Virtuemart 2.0.12f
Post by: nagohon on October 30, 2012, 11:22:29 AM
Hi friends,
I´ve a trouble with the position of related products. When I add some related products to a product, they appear in vertical, but I want that they appear in horizontal. I´ve testing with some options in default_relatedproducts.php, but they don´t work at all. What can I do? I attach the code of the php file and a capture of the problem. Thank you.

defined ( '_JEXEC' ) or die ( 'Restricted access' );
?>
        <div class="product-related-products">
    <h4><?php echo JText::_('COM_VIRTUEMART_RELATED_PRODUCTS'); ?></h4>

    <?php
    
foreach ($this->product->customfieldsRelatedProducts as $field) {
?>
<div class="product-field product-field-type-<?php echo $field->field_type ?>">
    <span class="product-field-display"><?php echo $field->display ?></span>
</div>
<?php ?>
        </div>




[attachment cleanup by admin]
Title: Re: Related products in Virtuemart 2.0.12f
Post by: K&K media production on October 30, 2012, 23:28:11 PM
Hi,

use css with float: left for the div's

regards
Title: Re: Related products in Virtuemart 2.0.12f
Post by: AH on October 31, 2012, 02:27:27 AM
use firebug in firefox to see which line of CSS is used to style the class, and test in firebug before live.

Do this for other styling (not always able to solve layout via CSS) problems, will save you many hours!!!