Zen Cart Logo
Forums / All Other Contributions/Addons / Add Order ID# and Customer Name to PDF Download

Add Order ID# and Customer Name to PDF Download

Locked

Views: 1,905

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
15 Feb 2010, 3:03 AM
#1
chrismarie avatar

chrismarie

New Zenner

Join Date:
Apr 2009
Location:
Chicago, IL
Posts:
45
Plugin Contributions:
0

Add Order ID# and Customer Name to PDF Download

Hi all,
I'm setting up a store with ZC 1.3.8a and I'm trying to create a coupon PDF download where the Customer's Order ID# and Name are added to the PDF and then the file is served up for download.

I've created the downloadable PDF files and that's all working great, but I don't know where to begin to add the customer's information to it.

I saw this on the v.2.0 thread:

Download system now allows notifier hook to allow intercept if alternate handling is required. This can allow for other protocols and even alterations to download content before delivery.

And it sounds a lot like what I'm trying to do. I have a ton of books that I'm trying to sort through, but my PHP kung fu is weak. Any help would be greatly appreciated.

15 Feb 2010, 3:41 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add Order ID# and Customer Name to PDF Download

And it sounds a lot like what I'm trying to do. I have a ton of books that I'm trying to sort through, but my PHP kung fu is weak.
As is my PDF knowledge
If this was a programmable email would be simpler but as far as I am aware a PDF is not dynamically programmable
But I have been incorrect many times

15 Feb 2010, 4:29 AM
#3
chrismarie avatar

chrismarie

New Zenner

Join Date:
Apr 2009
Location:
Chicago, IL
Posts:
45
Plugin Contributions:
0

Re: Add Order ID# and Customer Name to PDF Download

Thanks for the reply kobra. I'll try to clarify what I'm talking about a little because I think my initial post might have made my aim confusing.

I would like the result to be similar to what a PDF invoice generator does. You set up the background PDF file and then the cart combines it with the order info and creates a new PDF that the user can download. I've attached an example from the german rl_invoice3 mod. The first PDF is the background template and the second is the PDF invoice that was produced when I made a dummy order. I had to shrink the holy bejeezus out of the Invoice.pdf file to get to be small enough to attach, but I hope you can get the gist of what I'm saying.

I need this to happen with the product download as the background template, though and I'm not sure how to make that work. There's also the issue syncing it to the customers account download link. I'm studying the rl_invoice3 class to try to figure it out, but I was hoping that this effect had already been achieved or someone with more knowledge of the subject could lend a hand.

22 Feb 2010, 8:48 PM
#4
chrismarie avatar

chrismarie

New Zenner

Join Date:
Apr 2009
Location:
Chicago, IL
Posts:
45
Plugin Contributions:
0

Re: Add Order ID# and Customer Name to PDF Download

For any one who cares, I used the ezpdf class extension from http://www.ros.co.nz/pdf/ to get it done.

26 Feb 2010, 6:30 AM
#5
leilanddale avatar

leilanddale

New Zenner

Join Date:
Jan 2010
Posts:
69
Plugin Contributions:
0

Re: Add Order ID# and Customer Name to PDF Download

chrismarie:

For any one who cares, I used the ezpdf class extension from http://www.ros.co.nz/pdf/ to get it done.

This is exactly what I'm looking for but I have no idea how to go about doing this.

26 Feb 2010, 8:28 AM
#6
chrismarie avatar

chrismarie

New Zenner

Join Date:
Apr 2009
Location:
Chicago, IL
Posts:
45
Plugin Contributions:
0

Re: Add Order ID# and Customer Name to PDF Download

We're kind of bouncing around in different threads, so let's work it out in this one.

I'll try my best to help you get this set up for your cart, but first I need some specs:
Exactly what are you trying to watermark? (how many pages, pictures, etc)
What information do you want transferred from the store to the document?
What version of PHP is your server running?
What kind of security measures do you require for your document? Any other pertinent info?
Feel free to PM me if you don't want to air your business, but I'd like to keep as much info as possible available to other browsers so that my helping you can help them too.

26 Feb 2010, 1:24 PM
#7
leilanddale avatar

leilanddale

New Zenner

Join Date:
Jan 2010
Posts:
69
Plugin Contributions:
0

Re: Add Order ID# and Customer Name to PDF Download

chrismarie:

We're kind of bouncing around in different threads, so let's work it out in this one.

I'll try my best to help you get this set up for your cart, but first I need some specs:
Exactly what are you trying to watermark? (how many pages, pictures, etc)
What information do you want transferred from the store to the document?
What version of PHP is your server running?
What kind of security measures do you require for your document? Any other pertinent info?
Feel free to PM me if you don't want to air your business, but I'd like to keep as much info as possible available to other browsers so that my helping you can help them too.

I like what you've done with the watermarking so far. It's great. I might use that for something else. :D

As for this. I just need the customer order#, customer name and email addie in the header or footer.

I sell fiction e-books in different formats, pdf being one of them so the pdf file is already on my server. I just need the above information stamped onto all the pages in the current pdf when the person downloads the pdf book. Obviously this needs to happen on the fly without changing the pdf on the server itself but only the one the customer receives. All pdfs are unprotected and should remain that way. The e-Books differ in lenght so I can't give an exact number of pages.

MySQL version 5.0.89-community
PHP version 5.2.8

Let me know if there is anything else you need. :D Thanks a million!