VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: TAIWAR on November 12, 2013, 18:24:31 PM

Title: Name of the file to delete button add to cart on the print view of product
Post by: TAIWAR on November 12, 2013, 18:24:31 PM
Hello,

Joomla 25, on VM2022a, I use icon pdf, print and email. I want to delete some line (add cart button) from print view but I can't find the files and the lines...
I have just find on /www/components/com_virtuemart/views/productdetails/tmpl/defaut_pdf.php
But I try to override that but I have always the button add to cart...Somebody know what I have to delete please. Thank you.
Title: Re: Name of the file to delete button add to cart on the print view of product
Post by: Maxim Pishnyak on November 12, 2013, 18:26:17 PM
Could you make a test on latest versions?
Title: Re: Name of the file to delete button add to cart on the print view of product
Post by: TAIWAR on November 12, 2013, 18:48:29 PM
Actually I can't because my developper has customize some part of VM.
Title: Re: Name of the file to delete button add to cart on the print view of product
Post by: jenkinhill on November 12, 2013, 23:31:14 PM
Problem is that we don't use that old version any more as it has known critical security issues, so have no working test sites to see what fix works.
Title: Re: Name of the file to delete button add to cart on the print view of product
Post by: TAIWAR on November 19, 2013, 14:44:03 PM
I found a solution:
/www/components/com_virtuemart/views/productdetails/tmpl/default.php
I overrided the file in my template and delete this line 222:

<?php
// Add To Cart Button
// if (!empty($this->product->prices) and !empty($this->product->images[0]) and $this->product->images[0]->file_is_downloadable==0 ) {
// if (!VmConfig::get('use_as_catalog', 0) and !empty($this->product->prices['salesPrice'])) {
if($user->id) //add by ym in 2013-7-29
echo $this->loadTemplate('addtocart');
// } // Add To Cart Button END
?>
But the problem is that it delete all button add to cart on website...
Title: Re: Name of the file to delete button add to cart on the print view of product
Post by: Maxim Pishnyak on November 22, 2013, 22:23:50 PM
You should test is_me_on_print for this row.
Title: Re: Name of the file to delete button add to cart on the print view of product
Post by: TAIWAR on November 28, 2013, 13:23:15 PM
Sorry Maxim for my english but I don't understand what I should test please