Artizzz Posted September 26, 2012 Share Posted September 26, 2012 Hello! I have question about 1.5 versions pdf invoice. Why there are no carriers displayed in invoice? In history there are carrier displayed but in invoice no, I'm just wondering is it's on purpose or they just forgot to include it on new invoice? And I would like to know how can I include it on my invoice. best regards Link to comment Share on other sites More sharing options...
Artizzz Posted September 29, 2012 Author Share Posted September 29, 2012 still looking for answer. Link to comment Share on other sites More sharing options...
Jean86 Posted October 10, 2012 Share Posted October 10, 2012 Hello, You can put the carriers info into your invoice adding the following code : Into the file classes/pdf/HTMLTemplateInvoice, inside the function getContent() , put this code: $carrier = new Carrier((int)$this->order->id_carrier); $this->smarty->assign(array( 'order' => $this->order, 'carrier' => $carrier, )); and then in the file located in pdf/invoice.tpl, put the following code where do you want to appear into your invoice : {$carrier->name} - in order to show the carrier name. Best regards! 2 1 Link to comment Share on other sites More sharing options...
Artizzz Posted October 27, 2012 Author Share Posted October 27, 2012 Hello, You can put the carriers info into your invoice adding the following code : Into the file classes/pdf/HTMLTemplateInvoice, inside the function getContent() , put this code: $carrier = new Carrier((int)$this->order->id_carrier); $this->smarty->assign(array( 'order' => $this->order, 'carrier' => $carrier, )); and then in the file located in pdf/invoice.tpl, put the following code where do you want to appear into your invoice : {$carrier->name} - in order to show the carrier name. Best regards! Awesome! Just tested it, and it really works. Thanks... Link to comment Share on other sites More sharing options...
Eddyb Posted November 28, 2012 Share Posted November 28, 2012 Alternatively just add: {$order_invoice->getCarrier($order_invoice->id)->name} In pdf/invoice.tpl wherever you want the carrier name. 6 Link to comment Share on other sites More sharing options...
Eileen0101 Posted September 26, 2013 Share Posted September 26, 2013 Is there a way to also display the location that they choose? {$order_invoice->getCarrier($order_invoice->id)->name} only displays the name of the carrier not the location they choose for delivery from that carrier. Any help would be appreciated. Link to comment Share on other sites More sharing options...
tuk66 Posted September 27, 2013 Share Posted September 27, 2013 "... the location that they choose" Do you mean the delivery address? Link to comment Share on other sites More sharing options...
Eileen0101 Posted September 27, 2013 Share Posted September 27, 2013 No. In the agile delivery module they choose the carrier as agile and then they select delivery locations - those locations have addresses but I only need the name of the location to appear on the invoice. Thanks. Link to comment Share on other sites More sharing options...
cotto88 Posted October 9, 2013 Share Posted October 9, 2013 Hello, You can put the carriers info into your invoice adding the following code : Into the file classes/pdf/HTMLTemplateInvoice, inside the function getContent() , put this code: $carrier = new Carrier((int)$this->order->id_carrier); $this->smarty->assign(array( 'order' => $this->order, 'carrier' => $carrier, )); and then in the file located in pdf/invoice.tpl, put the following code where do you want to appear into your invoice : {$carrier->name} - in order to show the carrier name. Best regards! Alternatively just add: {$order_invoice->getCarrier($order_invoice->id)->name} In pdf/invoice.tpl wherever you want the carrier name. Thanks to you guys! Very helpfull for me because I'm looking for this solution since months and I finally find it ! As Eddyb said, you just have to add this line: {$order_invoice->getCarrier($order_invoice->id)->name} In pdf/invoice.tpl! Very easy... Link to comment Share on other sites More sharing options...
Zumo Posted July 23, 2015 Share Posted July 23, 2015 (edited) It worked for me in 1.6.1.0 version. Thanks! Edited July 23, 2015 by Zumo (see edit history) Link to comment Share on other sites More sharing options...
01generator Posted May 31, 2016 Share Posted May 31, 2016 Thank you saved a hole lot of time for me! Peace and love! Link to comment Share on other sites More sharing options...
tarabellek Posted July 6, 2016 Share Posted July 6, 2016 Great thread! How would I add the total with tax excluded? Link to comment Share on other sites More sharing options...
Recommended Posts