VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: barket on December 19, 2017, 23:37:32 PM

Title: [Solved] How to hide price and addtocart-button in product category view
Post by: barket on December 19, 2017, 23:37:32 PM
Hi! I am knew to this so pls be kind with me ;)

I am trying to remove the price and add-to-cart-button at the category view, but I would like to have the price and button in the detail view of the products.
How can i do that? Thank you for your time!
Title: Re: How to hide price and addtocart-button in product category view
Post by: aftertaf on December 19, 2017, 23:45:36 PM
you need to do a template override:
this means copying some 'default' files to a different location under your frontend template's folder.
There you make the changes you need to...
I learned how to comment out things in php.

read this lot first....
then try and ask again ;)

https://docs.virtuemart.net/tutorials/33-templating-layouts/78-introduction-template-system.html
https://forum.virtuemart.net/index.php?topic=132441.0

From <https://forum.virtuemart.net/index.php?topic=114686.0>
From <https://forum.virtuemart.net/index.php?topic=125166.0>

Title: Re: How to hide price and addtocart-button in product category view
Post by: barket on December 20, 2017, 04:07:28 AM
Well thank you very much for your respond. As far as I am concerened I will try to read that stuff, but I also do know how to comment stuff out. A small hint were I could find the code to commend it out, could be helpfull! Thx again!

Virtuemart 3.2.4
Title: Re: How to hide price and addtocart-button in product category view
Post by: jenkinhill on December 20, 2017, 12:25:32 PM
The file to edit and override is components/com_virtuemart/sublayouts/products.php   Prices and add to cart are displayed using other sublayouts, called in this file.

echo shopFunctionsF::renderVmSubLayout('prices'....................

echo shopFunctionsF::renderVmSubLayout('addtocart'.................
Title: Re: How to hide price and addtocart-button in product category view
Post by: barket on January 06, 2018, 10:19:08 AM
Thank you very much! It worked and I am so happy! Greetings too you kind helpers!
Title: Re: How to hide price and addtocart-button in product category view
Post by: aftertaf on January 07, 2018, 18:50:48 PM
can u mark your topic as [SOLVED]? :)
Sorry, couldn't elaborate more but you got direct & precise help from one of the super heros :) !!
Title: Re: How to hide price and addtocart-button in product category view
Post by: Jörgen on January 07, 2018, 19:01:05 PM
ehrmmm

already marked as solved  :D

Jörgen @ Kreativ Fotografi
Title: Re: How to hide price and addtocart-button in product category view
Post by: aftertaf on January 07, 2018, 22:46:24 PM
ok, duhh moment for me :)