Can a link be added in front end order management to the pdf

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
RCheesley
Phoca Member
Phoca Member
Posts: 12
Joined: 16 Aug 2008, 11:40

Can a link be added in front end order management to the pdf

Post by RCheesley »

Hi Jan,

Is it possible to add a link (like the pdf symbol on the Delivery tab) to the order management page in the front end?

I know which pages to edit and whatnot, but no idea what code would need to go there to create such a link.

Ruth
RCheesley
Phoca Member
Phoca Member
Posts: 12
Joined: 16 Aug 2008, 11:40

Re: Can a link be added in front end order management to the pdf

Post by RCheesley »

Jan,

I've been looking into this and having checked out the code used to make the PDF in the back end - for my site this was:

Code: Select all

http://www.theukvendingcompany.co.uk/administrator/index2.php?page=order.order_print&func=deliveryNoteAsPDF&format=printpdf&tmpl=component&order_id=20&no_menu=1&no_html&delivery_id=10&option=com_virtuemart&vmtoken=7f585076f42da77292ab3db26d54b4a5&gen=bill
I wondered, does the PDF have to have the vmtoken to create? Is there any way of doing it without requiring the /administrator/index2.php section? I tried it without the vmtoken, and it does create a PDF but it calls it index2.php.pdf (obv it doesn't have permissions to get any further).

An alternative, perhaps, would be that when the delivery is made, the PDF file is saved somewhere rather than just made on the fly? Is this possible at all?

Ruth
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48041
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Can a link be added in front end order management to the pdf

Post by Jan »

Hi, where is the problem ? ... the pdf is not displaying with this link?

btw... the pdf is created by joomla framework pdf solution ... you can send it to the browser or you can make it as downloadable file, just change:

$pdf->Output( 'delivery.pdf', "I" );

to:
$file = absolute path where the file should be saved
$pdf->Output( $file, "F" ); // saving file on the server

or
$pdf->Output('delivery.pdf', "D" ); // downloadable file in the server
in delivery.pdf.php

Jan
If you find Phoca extensions useful, please support the project
Post Reply