VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: GrahamSA on April 14, 2015, 15:59:30 PM

Title: VM3. How to remove "product details" button in the product layout page?
Post by: GrahamSA on April 14, 2015, 15:59:30 PM
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
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: MAXsam_+ on April 14, 2015, 20:38:55 PM
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

Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: jenkinhill on April 14, 2015, 21:16:31 PM
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
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: billynair on May 16, 2015, 12:54:03 PM
Or VM could just add an option to turn it off...
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: lindapowers on October 13, 2015, 10:21:52 AM
Quote from: billynair on May 16, 2015, 12:54:03 PM
Or VM could just add an option to turn it off...

+1
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: GJC Web Design on October 13, 2015, 12:43:04 PM
QuoteOr 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
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: AH on October 13, 2015, 13:28:27 PM
QuoteAs I assume the majority use 3rd party templates this would do nothing until all templaters updated to use this switch

+1
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: lindapowers on October 13, 2015, 15:03:18 PM
Quote from: GJC Web Design on October 13, 2015, 12:43:04 PM
QuoteOr 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.
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: AH 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
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: GJC Web Design 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 ...
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: OscJa 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>
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: jenkinhill 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.
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: OscJa 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;}
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: Jörgen on September 04, 2020, 11:29:10 AM
Quote from: OscJa 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;}

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
Title: Re: VM3. How to remove "product details" button in the product layout page?
Post by: pinochico 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.