Page 1 of 1

deliveryNoteAsPDF = missing function?

Posted: 03 Oct 2008, 13:28
by akerman
Hi Jan,

I've been using the Addon for a couple of months and everything works fine. :)

However I'm trying to understand Fällmans coding. :x

The function "deliveryNoteAsPDF" as coded below in 'ps_order_delivery.php', when building the PDF link to the PDF creator, is nowhere to be found? I've checked all included files in the addon, as well as those connected to the 'tcpdf' functions in Joomla!...

Code: Select all

           $pdf_url= $sess->url( URL
			. "index2.php?page=order.order_print"
			. "&func=deliveryNoteAsPDF&order_id=".$this->order_id
			. "&format=printpdf&tmpl=component&no_menu=1"
			. "&no_html&delivery_id=".$db->f('delivery_id'));
Do you have any idea where I can see that piece of code?

Regards
Akerman

Re: deliveryNoteAsPDF = missing function?

Posted: 03 Oct 2008, 19:01
by Jan
Hi, I am not 100% sure (because I did it a long time ago) but this function should be not used because joomla framework document's structure is used...

In Joomla 1.5 you can display data in more formats: raw, html, pdf... they are stored here:

libraries/joomla/document/ and called documents... so I have created a document format called printpdf which is a document to render VirtueMart's PDF ... this is saved in:

libraries/joomla/document/printpdf folder....

you can see in the link:

. "&format=printpdf&tmpl=component&no_menu=1" and it means:

- printpdf format will be called (VirtueMart's PDF will be displayed: format=printpdf)
- and it will be displayed in popup window (tmpl=component)

&func=deliveryNoteAsPDF ... this should be obsolete... try to remove it and it should work without this piece of code...

All PDF behaviour (new document, tcpdf subclasses, rendering data in pdf) I have done for Joomla! 1.5 ... nothing about pdf is used from the Ingemar's solution...

Jan

Re: deliveryNoteAsPDF = missing function?

Posted: 04 Oct 2008, 09:09
by akerman
Thanks,

that was most helpful of you!

It clarifies a bit more for me and I'll see if I can improve my skills in creating PDF's for Joomla!

(Will mark this as solved, after I've tried a couple of things... :wink: )

Regards
akerman

Re: deliveryNoteAsPDF = missing function?

Posted: 04 Oct 2008, 16:33
by Jan
:wink: