Page 1 of 1
Can a link be added in front end order management to the pdf
Posted: 07 Sep 2008, 23:42
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
Re: Can a link be added in front end order management to the pdf
Posted: 08 Sep 2008, 00:39
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
Re: Can a link be added in front end order management to the pdf
Posted: 08 Sep 2008, 21:23
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