VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: mabeall32 on July 02, 2015, 20:39:25 PM

Title: Hide Add to Cart on Category view screen
Post by: mabeall32 on July 02, 2015, 20:39:25 PM
How can I hide the Add to Cart on the Category View.  I only want it to show on the product detail page. 

Joomla 3.4.1 & Virtuemart 3.0.9
Title: Re: Hide Add to Cart on Category view screen
Post by: AH on July 02, 2015, 22:35:01 PM
You will need to do an override to the sublayout file

components/com_virtuemart/sublayouts/products.php

make a copy in:-

templates/YOURTEMPLATE/html/com_virtuemart/sublayouts/products.php


then remove this section:-

<?php //echo $rowsHeight[$row]['customs'] ?>
<div class="vm3pr-<?php echo $rowsHeight[$row]['customfields'?>"> <?php
echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row])); ?>

</div>




This will remove the price and any customfields that may show in the browse category pages
Title: Re: Hide Add to Cart on Category view screen
Post by: servlet on November 06, 2015, 20:24:17 PM
Thank you for information! :)
Title: Re: Hide Add to Cart on Category view screen
Post by: loppan on December 22, 2015, 18:08:24 PM
Thank You AH for the information, I was struggling with this for a while... On a side note - there should totally be an option for this in the Virtuemart settings in future versions :).
Title: Re: Hide Add to Cart on Category view screen
Post by: AH on December 22, 2015, 20:21:23 PM
 :)