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.
Use target attribute for url html tag.
Your URL?
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.
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?
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" ?
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
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');
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...
any idea please...
:( :( :( Someone ???