Author Topic: VM3. How to remove "product details" button in the product layout page?  (Read 7011 times)

GrahamSA

  • Beginner
  • *
  • Posts: 1
  • A beginner
Hey guys!

Not too sure if I should have started a new topic?
I have VirtueMart 3.0.7
Where would this bit of code be found so I can do the same as I can not find the button code in this file?

Thanks so much

MAXsam_+

  • Beginner
  • *
  • Posts: 3
Hi GrahamSA,

Rather than changing the code, you can easily remove the button with a language override...

Go to Extensions/Language Manager/Overrides

Find
COM_VIRTUEMART_PRODUCT_DESC_TITLE
add an empty string


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27842
  • Always on vacation
    • Jenkin Hill Internet
NO!!  That would just remove the title "Description" from the product details page.

Removing the product details button in VM3 categories can be done by hiding it with a css override (eg   div.vm-details-button {display:none;}  for the default VM template )

or

Edit the file components/com_virtuemart/sublayouts/products.php  and use the edited file as a template sublayouts override.   The code block is annotated - <?php // Product Details Button

http://docs.virtuemart.net/tutorials/templating-layouts.html
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 VM 3.8.4.10335 on Joomla 3.9.21 PHP 7.4.9

billynair

  • Beginner
  • *
  • Posts: 14
  • What does HREF mean?!?
Or VM could just add an option to turn it off...
Kick out before you slap the lip

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #4 on: October 13, 2015, 10:21:52 am »
Or VM could just add an option to turn it off...

+1

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9777
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #5 on: October 13, 2015, 12:43:04 pm »
Quote
Or VM could just add an option to turn it off...

As I assume the majority use 3rd party templates this would do nothing until all templaters updated to use this switch
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3262
  • VirtueMart Version: 3.8.4
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #6 on: October 13, 2015, 13:28:27 pm »
Quote
As I assume the majority use 3rd party templates this would do nothing until all templaters updated to use this switch

+1
regards
A

Joomla 3.9.20
php 7.3

lindapowers

  • Full Member
  • ***
  • Posts: 1335
  • If you're going through hell, keep going.
    • Los Angeles immigration lawyers
  • Skype Name: manu.gonzalez91
  • VirtueMart Version: Latest avi
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #7 on: October 13, 2015, 15:03:18 pm »
Quote
Or VM could just add an option to turn it off...

As I assume the majority use 3rd party templates this would do nothing until all templaters updated to use this switch

That argument seems valid to never add a new feature to VM. Of course templaters will have to add this.. thats what they are payed for.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3262
  • VirtueMart Version: 3.8.4
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #8 on: October 13, 2015, 16:37:14 pm »
I was not suggesting that new features should not be added

If it were added the templaters would also have to cater for such a thing
regards
A

Joomla 3.9.20
php 7.3

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9777
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #9 on: October 13, 2015, 20:17:27 pm »
div.vm-details-button {display:none;}   seems so much easier...  ;)

or over ride the sublayout/products.php  both a couple of mins work

plus I see so many commercial VM templates for sale that haven't even caught up with using sublayouts or still hard code their price displays etc ...
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

OscJa

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #10 on: September 03, 2020, 13:33:39 pm »
Hi there :) Can I ask how you over ride this products.php file   ?

<div class="vm-details-button">
            <?php // Product Details Button
            $link = empty($product->link)? $product->canonical:$product->link;
            echo JHtml::link($link.$ItemidStr,vmText::_ ( 'COM_VIRTUEMART_PRODUCT_DETAILS' ), array ('title' => $product->product_name, 'class' => 'product-details' ) );
            //echo JHtml::link ( JRoute::_ ( 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id , FALSE), vmText::_ ( 'COM_VIRTUEMART_PRODUCT_DETAILS' ), array ('title' => $product->product_name, 'class' => 'product-details' ) );
            ?>
         </div>

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27842
  • Always on vacation
    • Jenkin Hill Internet
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #11 on: September 03, 2020, 15:56:15 pm »
As written 5 years ago:

Edit the file components/com_virtuemart/sublayouts/products.php  and use the edited file as a template sublayouts override.   The code block is annotated - <?php // Product Details Button

http://docs.virtuemart.net/tutorials/templating-layouts.html

The edited file is placed in templates/[YourJoomlTemplate]/html/com_virtuemart/sublayouts

But using the CSS solution is easier.
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 VM 3.8.4.10335 on Joomla 3.9.21 PHP 7.4.9

OscJa

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #12 on: September 04, 2020, 11:16:58 am »
Ok, will try the easy way :)

Where is the file for this code located? div.vm-details-button {display:none;}

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2996
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #13 on: September 04, 2020, 11:29:10 am »
Ok, will try the easy way :)

Where is the file for this code located? div.vm-details-button {display:none;}

This is css, and is not located anywhere !!!

You should place this in your css file, the filename is different for every template.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 642
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: VM3. How to remove "product details" button in the product layout page?
« Reply #14 on: September 04, 2020, 12:04:31 pm »
So much patience ... :)

Unfortunately, this is due to society and internet.
If, for example, it was the work of a carpenter, it would never happen, because if he is not trained == be able to do all the basic work, he will never sell his products == no one will buy them, because they will be of poor quality.

The free internet e-shop does where anyone, even if they can't do anything.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates