VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Animakai on August 15, 2017, 14:47:26 PM

Title: Remove "addtocart-area" from category but not from product details
Post by: Animakai on August 15, 2017, 14:47:26 PM
Hi Ppl!

I have a question for you. I want to remove/dissapear the addtocart-area (specifically addtocart button and custum-field) from the category layout/or front page but not from product details. Is this possible?

Im using VM3.

Thx.
Title: Re: Remove "addtocart-area" from category but not from product details
Post by: K&K media production on August 15, 2017, 15:25:26 PM
You can make a template override for the sublayout products.php. Look around line 127 for this code and disable or delete it.

echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop', 'addtocart')));
Title: Re: Remove "addtocart-area" from category but not from product details
Post by: Animakai on August 15, 2017, 17:02:13 PM
Thx for response K&K.

I deleted that row and save but anything change. The problem is in the original layout archive?
Title: Re: Remove "addtocart-area" from category but not from product details
Post by: K&K media production on August 15, 2017, 18:27:24 PM
No it depends on your template. If you've a override for this sublayout, you must change the existing sublayout. If you don't have it, create it. But is also possible that your template don't use the sublayout. If you've a old or commercial template, you should ask your template developer to find the code to delete.