News:

Looking for documentation? Take a look on our wiki

Main Menu

How to remove ADD TO CART from category page

Started by bobdxb, October 30, 2024, 12:30:52 PM

Previous topic - Next topic

bobdxb

Hi,
I have tried some suggestions here in forum, but none worked for me. I want to remove ADD TO CART button from Category page since many products have color options before proceeding to cart.

Link to one of the categories
https://store.milmartrading.com/shop/mobile-phones-tablets

Tks for help

iWim

You can create an override of ~/components/com_virtuemart/sublayouts/(bs*-)product.php and see if you can remove/hide the addtocart stuff.

For me the code looked too complicated. (Still does.)
I decided  (a long time ago) it was much easier to "just" use css.
.product .addtocart-area { display: none; }

AH

Create an override to the file:
components\com_virtuemart\sublayouts\products.php

Comment out this section as shown below:

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

<!-- </div>-->

Regards
A

Joomla 4.4.5
php 8.1