Name of the file to delete button add to cart on the print view of product

Started by TAIWAR, November 12, 2013, 18:24:31 PM

Previous topic - Next topic

TAIWAR

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.

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

TAIWAR

Actually I can't because my developper has customize some part of VM.

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

TAIWAR

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...

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

TAIWAR

Sorry Maxim for my english but I don't understand what I should test please