skovbakke Posted April 9, 2014 Share Posted April 9, 2014 Hi, I've been trying to use the delivery slip to print out a packing list and an address label on one piece of paper. The paper I'm using has a dedicated peel-off section, where I place the delivery address, so it's ready to stick on the package right after packing. In order to place the address in a fixed position on the paper, I have put it in the footer of the delivery slip(by overriding) and adjusted it so it fits. This works very well if I print one delivery slip at the time, but since the idea was to save time and work, I would like to print all delivery slips once a day and bring them to the packing room to do all shipments in one round. When I try to do this, the addresses gets mixed up. The address in the footer is not the same as the one in the top of the delivery slip, -it's the same as the one on top of the next delivery slip! Seems to me that somehow the next footer is created before the active pdf is closed in the tcpdf workflow...that would be very illogical, but is there another explanation? The idea is to add the needed information to the footer informations in HTMLTemplateDeliverySlip.php and then create a seperate footer.tpl for the delivery slip that displays the info as wanted. PDF.php and HTMLTemplate.php are overridden so they use this new footer, when handling a PDF of the type Delivery Slip. Does anybody have a workaround for this, or another way to accomplish what I'm going for? Thanks in advance, Jeppe PS Most of the action is in HTMLTemplateDeliverySlip, but HTMLTemplate is also attached, to show what I'm trying to do. For some reason I can't upload my footer_delivery.tpl, but it just adds $delivery_address and places it correctly. HTMLTemplate.php HTMLTemplateDeliverySlip.php Link to comment Share on other sites More sharing options...
tuk66 Posted April 10, 2014 Share Posted April 10, 2014 I don't know how to easily fix it in plain PrestaShop, but the M4 PDF Extensions module already has more templates with integrated label and there is no problem to print several invoices or delivery slips at once. Link to comment Share on other sites More sharing options...
skovbakke Posted April 11, 2014 Author Share Posted April 11, 2014 Thanks. I've already been looking at your module, and it would certainly be able to solve my problem. It can also do a lot more, but the for my needs the price is a little steep since I just need it for fixing this one small problem. Link to comment Share on other sites More sharing options...
shubbing Posted May 1, 2014 Share Posted May 1, 2014 Hi, I've been trying to use the delivery slip to print out a packing list and an address label on one piece of paper. The paper I'm using has a dedicated peel-off section, where I place the delivery address, so it's ready to stick on the package right after packing. In order to place the address in a fixed position on the paper, I have put it in the footer of the delivery slip(by overriding) and adjusted it so it fits. This works very well if I print one delivery slip at the time, but since the idea was to save time and work, I would like to print all delivery slips once a day and bring them to the packing room to do all shipments in one round. When I try to do this, the addresses gets mixed up. The address in the footer is not the same as the one in the top of the delivery slip, -it's the same as the one on top of the next delivery slip! Seems to me that somehow the next footer is created before the active pdf is closed in the tcpdf workflow...that would be very illogical, but is there another explanation? The idea is to add the needed information to the footer informations in HTMLTemplateDeliverySlip.php and then create a seperate footer.tpl for the delivery slip that displays the info as wanted. PDF.php and HTMLTemplate.php are overridden so they use this new footer, when handling a PDF of the type Delivery Slip. Does anybody have a workaround for this, or another way to accomplish what I'm going for? Thanks in advance, Jeppe PS Most of the action is in HTMLTemplateDeliverySlip, but HTMLTemplate is also attached, to show what I'm trying to do. For some reason I can't upload my footer_delivery.tpl, but it just adds $delivery_address and places it correctly. I stumbled upon a blog post which kind of addresses your need, except that it appends the address to the invoice which can double up as a packing list too. Here's the link: http://e-shopblog.com/prestashop/how-to-add-a-shipping-label-to-prestashop-pdf-invoice/ Link to comment Share on other sites More sharing options...
skovbakke Posted May 1, 2014 Author Share Posted May 1, 2014 I stumbled upon a blog post which kind of addresses your need, except that it appends the address to the invoice which can double up as a packing list too. Here's the link: http://e-shopblog.com/prestashop/how-to-add-a-shipping-label-to-prestashop-pdf-invoice/ Thanks a lot. I've actually tried that one already, but couldn't make it work properly. The author doesn't seem to be following it so closely, as I've posted a question on the blog back in January, that's still awaiting moderation :-) In theory, there shouldn't be any differences between using the delivery slip or the invoice, so his solution will probably have the same problem with bulk printing. Right now we just print them individually, but it's quite a hassle, and I would still love if someone could point me in the direction of a solution, as it seems to be 90% there. Thanks again, Jeppe Link to comment Share on other sites More sharing options...
Recommended Posts