I'm trying to disable the add-to-cart field from category view when there are custom field dropdowns in VM3. In VM1 I had it working like this.
Does anyone have an idea how to get this working?
Vm1 did not show the add to cart in the category view if there were customfields
The great thing about vm3 is that it allows customfields to be displayed and selected
If you want to disable these you will need to do a sublayout override
Quote from: Hutson on December 16, 2014, 20:43:39 PM
Vm1 did not show the add to cart in the category view if there were customfields
The great thing about vm3 is that it allows customfields to be displayed and selected
If you want to disable these you will need to do a sublayout override
And that's exactly what I've been trying to achieve but I didn't get it to work after a few hours of trying...
So I was now hoping for someone to come up with the proper code or a tip/hint. This is what I have been trying in sublayouts/products.php:
<?php //echo $rowsHeight[$row]['price']
?>
<div class="vm3pr-<?php echo $rowsHeight[$row]['price'] ?>" style="display:table-cell; min-width:110px; padding-right:15px"> <?php
echo shopFunctionsF::renderVmSubLayout('prices',array('product'=>$product,'currency'=>$currency)); ?>
</div>
<?php //echo $rowsHeight[$row]['customs'] ?>
<div class="vm3pr-<?php echo $rowsHeight[$row]['customfields'] ?>" style="display:table-cell; min-width:110px; padding-right:15px"> <?php
if (!empty($product->customfields)) {
echo "<p>has custom fields</p>";
}
else{ echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row]));
} ?>
</div>
I added code to my previous post, but I have a feeling people who al ready read my post before that, won't see it. So I'm bumping my topic.