News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How modify link pdf product VM 2 to open in onother windows ?

Started by TAIWAR, October 07, 2013, 19:07:48 PM

Previous topic - Next topic

TAIWAR

Hello
I use pdf button Virtumart 2.0.22a
By defaut when we click on pdf button, another page open but I want it open in another page. How to chnage it 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

http://demoboutique.swebcreation.com/power-tools/interieur/drill-detail.html

Where do I have to add the target attribute ?

And then I try to change pdf product preview with pdf.php (delete line ask question) but that s not the right file.


Maxim Pishnyak

I used Firebug and find corresponding row in product details template file
echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_icon', false);
Did you see it?
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

With firebug  I found this :

<div class="icons">
<a href="/drill-detail.pdf?tmpl=component" title="PDF">
<img alt="PDF" src="/templates/demoboutiqueswebcreation/images/pdf_button.png">
</a>

But I found the file with the code echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_icon', false); (defaut.php)
where I can add target="_blank" ?




Maxim Pishnyak

You should be able to use not only Firebug, but also text search for finding some commands.
I see that linkIcon declared in components\com_virtuemart\helpers\vmview.php
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

Ok thank you, I modify this line and have the pdf in popup target and not in onother windows page...But now the add to cart button not ok...

/www/components/com_virtuemart/helpers/vmview.php

LINE 28
function linkIcon($link,$target=_blank ,$altText ='',$boutonName,$verifyConfigValue=false, $modal = true, $use_icon=true,$use_text=false)


/www/components/com_virtuemart/views/productdetails/tmpl/default.php

LINE 131 to 135 

echo $this->linkIcon($link . '&format=pdf', 'COM_VIRTUEMART_PDF', 'pdf_button', 'pdf_button', false);
      
       }
       echo $this->linkIcon($link . '&print=1', 'COM_VIRTUEMART_PRINT', 'printButton', 'printButton');
       echo $this->linkIcon($MailLink, 'COM_VIRTUEMART_EMAIL', 'emailButton', 'emailButton');


TAIWAR

The add to cart is solved (it because my file cart.php was empty... don't know why...)
But I always have the pdf on popup and not in another windows page...