mkweb09 Posted September 27, 2013 Share Posted September 27, 2013 Hi Guys, Is there anyway the following code is wrong/would break the pdf? <div style="width:100%; text-align:center;"> <table style="font-style: bold; font-size: 24px; border-top: 2px solid #000000; border-bottom: 2px solid #000000"> <tr> <td style="text-align: center; height:16px;"> {l s='Order Number:' pdf='true'} : {$order->getUniqReference()} </td> <td style="text-align: center; height:16px;"> {l s='Order Date:' pdf='true'} : {$order->date_add|date_format:"%d-%m-%Y %H:%M"} </td> <td style="text-align: center; height:16px;"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} {l s='Paid By' pdf='true'} : {$payment->payment_method} </td> {foreachelse} <td style="text-align: center; height:16px;"> {l s='No payment' pdf='true'} </td> {/foreach} <td style="text-align: center; height:16px;"> {l s='Shipped By' pdf='true'} : {$carrier->name} </td> </tr> </table> </div> I've attached what the PDF looks like when it comes out, although sometimes it looks fine!! The Order Info i.e Order Number, Date, Payment Method and shipping method should be aon a single line. Very strange. Just want to know if I've written any bad code here? Or if there are any solutions? Cheers, Link to comment Share on other sites More sharing options...
tuk66 Posted September 30, 2013 Share Posted September 30, 2013 You have got "crossed" tags here: <td style="text-align: center; height:16px;"> {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} {l s='Paid By' pdf='true'} : {$payment->payment_method} </td> {foreachelse} <td style="text-align: center; height:16px;"> {l s='No payment' pdf='true'} </td> {/foreach} Link to comment Share on other sites More sharing options...
Recommended Posts