News:

Support the VirtueMart project and become a member

Main Menu

Bug in Virtuemart products module?

Started by ahaaaa, September 20, 2012, 20:46:53 PM

Previous topic - Next topic

ahaaaa

I've been playing around with the module to display stockable variants price variations in 2.0.10. To get them to display correctly per product seems to require a code amendment which I assume is bug?

Changing the following for Divs solves it

<?php
if ($col == $products_per_row && $products_per_row && $col $totalProd) {
echo " </div><div style='clear:both;'>";
$col 1;
} else {
$col++;
}
?>

To
<?php
if ($col == $products_per_row && $products_per_row && $col $totalProd) {
echo "</div><div style='clear:both;'>";
$col 1;
} else {
echo "</div><div>";
$col++;
}
?>


Changing the following for List based ul-li solves it

<?php
if ($col == $products_per_row && $products_per_row && $last) {
echo '
</ul><div class="clear"></div>
<ul  class="vmproduct' 
$params->get ('moduleclass_sfx') . ' productdetails">';
$col 1;
} else {
$col++;
}
$last--;
endforeach; ?>


to

<?php
if ($col == $products_per_row && $products_per_row && $last) {
echo '
</ul><div class="clear"></div>
<ul  class="vmproduct' 
$params->get ('moduleclass_sfx') . ' productdetails">';
$col 1;
} else {
echo '
</ul><div></div>
<ul  class="vmproduct' 
$params->get ('moduleclass_sfx') . ' productdetails">';
$col++;
}
$last--;
endforeach; ?>


seems to do the trick.