How Can I Print Out a Customer-Supplied Gift Message as a Separate Document or Additional Page of Packing Slip, etc?

magento.stackexchange https://magento.stackexchange.com//questions/45001

  •  12-12-2019
  •  | 
  •  

Question

I'v found a few "tutorials" but I just don't "get" how/where they're doing most of the coding well enough to make it work. (e.g. http://inchoo.net/magento/add-gift-message-to-magentos-pdf-packingslip/)

Found this: https://stackoverflow.com/questions/1795725/zend-pdf-word-wrapping but haven't much luck getting it to work. (Actually not sure what to do with this code/where to put it all and have it be available, etc.)

I'm thinking that adding another page to the packing slip or pick slip might work and then including the From/To/Message stuff on that page with some artwork, maybe a fancy font or whatnot will be sufficient. Then, the "extra" page could be slipped into the box by whoever is picking the order.

Not sure at all how to "hack" the packing slip to add a page break and how to work the Zend PDF stuff at all. Any help would be appreciated.

Was it helpful?

Solution 2

I ended up using the insights supplied here to figure out a solution.

I feel that I must mention that I also edited the packing slip template to remove any mention of prices and payment methods (not sure why they'd be on a packing slip anyhow) and we use an extension that allows printing the packing slip before shipping the order (again, I don't understand the Magento thinking concerning packing slips only being available after shipping) so we just include the modified packing slip with the gift message in the box.

OTHER TIPS

Working with the Zend Pdf library is a nightmare. It is a paid extension but the Fooman Pdf Customiser makes it much easier to manipulate/style the PDF's. It uses the tcpdf library.

Edit {{your-theme}}/template/fooman/pdfcustomiser/order/bottom.phtml and add the needed spacing to push to gift message on to a second page.

Look for this code:

$pdfHelper->OutputGiftMessage()
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top