VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: capoeira on March 10, 2015, 22:13:26 PM

Title: Remove add to cart button from product list
Post by: capoeira on March 10, 2015, 22:13:26 PM
Hi there, I'm using VM3. I was wondering if it's possible to remove the Add-to-cart button from product list so that customers can only see name of the product and product image, then when he clicks on product details, the button will be present there, I've seen a guide to do that on VM2 but unfortunately it's a bit different from current release.
Title: Re: Remove add to cart button from product list
Post by: AH on March 10, 2015, 22:37:15 PM
I thought this was a configuration

If someone post here that it is - then use that

If not create a template overrride

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

and remove or comment out this

      <?php echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row])); ?>
Title: Re: Remove add to cart button from product list
Post by: capoeira on March 11, 2015, 00:49:15 AM
that did the trick, thanks
Title: Re: Remove add to cart button from product list
Post by: flykari on October 16, 2015, 16:08:33 PM
I have the same problem put I can not find that file to modify :(

I use Protostar template VM 3.0.10

Could you help :)
Title: Re: Remove add to cart button from product list
Post by: flykari on October 16, 2015, 17:51:59 PM
I found the file but when I edited it, it deleted the Add the cart Button from product page not from product list page :(

Hope someone can help me :)
Title: Re: Remove add to cart button from product list
Post by: GJC Web Design on October 16, 2015, 18:04:41 PM
Quoteremove or comment out this

      <?php echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row])); ?>

in an over ridden views/categories/default.php
Title: Re: Remove add to cart button from product list
Post by: flykari on October 16, 2015, 18:12:55 PM
Thank you.

but I am so dummy that I can not find this ...

"in an over ridden views/categories/default.php"

Kari

Title: Re: Remove add to cart button from product list
Post by: GJC Web Design on October 16, 2015, 18:16:20 PM
category sorry

\components\com_virtuemart\views\category\tmpl\default.php
Title: Re: Remove add to cart button from product list
Post by: flykari on October 16, 2015, 18:25:21 PM
Ok. thank you. Now I find the file , but I donot that line in default.php ?
Removed post of incorrect PHP file - please try not to post complete files
Title: Re: Remove add to cart button from product list
Post by: jenkinhill on October 16, 2015, 19:44:01 PM
This thread was not about VM3.0.10 but about an earlier version. The addtocart sublayout  is now called in components/com_virtuemart/sublayouts/products.php so it is that file you need to edit & override.
Title: Re: Remove add to cart button from product list
Post by: flykari on October 16, 2015, 20:08:24 PM
Thank you very much !

I try it first thing in the morning.

Best regards from Finland

Good night

Kari
Title: Re: Remove add to cart button from product list
Post by: flykari on October 19, 2015, 10:23:47 AM
This solved my problem :)

Thank you !!!


Kari / Finland

Next I´l try to find from where to modify the customer mail ..