Author Topic: [Solved] How to hide price and addtocart-button in product category view  (Read 287 times)

barket

  • Beginner
  • *
  • Posts: 3
  • A beginner
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!

aftertaf

  • Jr. Member
  • **
  • Posts: 181
    • sO couture
  • VirtueMart Version: 3.2.12
Re: How to hide price and addtocart-button in product category view
« Reply #1 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>

Webmaster for my wife (link in my profile ;)
Extensions / plugins : POSForWebshops, TemplatecreatorCK ,MaximenuCK, and PageBuilderCK, VM BatchEdit Pro, VM CustomFilters Pro, Awocoupon Pro, slogin, supersaas,  among other things...
Joomla! 3.8.5//VM 3.2.12//PHP7.0.18 & mariadb 10.1.22 on Debian
big up to notepad++!!!!

barket

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: How to hide price and addtocart-button in product category view
« Reply #2 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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 26500
  • Always on vacation
    • Jenkin Hill Internet
Re: How to hide price and addtocart-button in product category view
« Reply #3 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'.................
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM3.2.12.9708 on Joomla 3.8.3 PHP 7.0.25

Testing VM3.2.12.9708 on J3.8.3

barket

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: How to hide price and addtocart-button in product category view
« Reply #4 on: January 06, 2018, 10:19:08 am »
Thank you very much! It worked and I am so happy! Greetings too you kind helpers!

aftertaf

  • Jr. Member
  • **
  • Posts: 181
    • sO couture
  • VirtueMart Version: 3.2.12
Re: How to hide price and addtocart-button in product category view
« Reply #5 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 :) !!
Webmaster for my wife (link in my profile ;)
Extensions / plugins : POSForWebshops, TemplatecreatorCK ,MaximenuCK, and PageBuilderCK, VM BatchEdit Pro, VM CustomFilters Pro, Awocoupon Pro, slogin, supersaas,  among other things...
Joomla! 3.8.5//VM 3.2.12//PHP7.0.18 & mariadb 10.1.22 on Debian
big up to notepad++!!!!

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1238
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: How to hide price and addtocart-button in product category view
« Reply #6 on: January 07, 2018, 19:01:05 pm »
ehrmmm

already marked as solved  :D

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

aftertaf

  • Jr. Member
  • **
  • Posts: 181
    • sO couture
  • VirtueMart Version: 3.2.12
Re: How to hide price and addtocart-button in product category view
« Reply #7 on: January 07, 2018, 22:46:24 pm »
ok, duhh moment for me :)
Webmaster for my wife (link in my profile ;)
Extensions / plugins : POSForWebshops, TemplatecreatorCK ,MaximenuCK, and PageBuilderCK, VM BatchEdit Pro, VM CustomFilters Pro, Awocoupon Pro, slogin, supersaas,  among other things...
Joomla! 3.8.5//VM 3.2.12//PHP7.0.18 & mariadb 10.1.22 on Debian
big up to notepad++!!!!