VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: capricornio on February 02, 2013, 14:57:32 PM

Title: VM2.0.18a: Unpublised related products space reserved
Post by: capricornio on February 02, 2013, 14:57:32 PM
If a product has four related products and one of them is set to unpublised, the product seems not to get filtered out in the divs of the default_relatedproducts.php, leaving space in the template.
I want to check whether the related product is unpublised, but what is the arrayfield for this and is it retrieved by default ? Or whatelse modification do I need to make in templated overrides ?
Title: Re: VM2.0.18a: Unpublised related products space reserved
Post by: Milbo on February 03, 2013, 19:18:07 PM
You mean, you cant see the product, but the empty space is left? lol. Which version?


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



is changed for next version
Title: [SOLVED] Re: VM2.0.18a: Unpublised related products space reserved
Post by: capricornio on February 04, 2013, 08:22:20 AM
thnx Milbo,

Exactly what I was looking for !