PrestaShop show order comment in PDF invoice

To show user comment in PrestaShop PDF invoice

Edit file classes/pdf/HTMLTemplateInvoice.php

vi classes/pdf/HTMLTemplateInvoice.php

Inside function getContent(), find around line 161

$carrier = new Carrier((int) $this->order->id_carrier);

Add below

$sokOrderComment = $this->order->getFirstMessage();

In the same file, around line 333, find the $array variable, inside it, add

'sokOrderComment' => $sokOrderComment,

PrestaShop order comment in invoice

Edit file pdf/invoice.tpl

vi pdf/invoice.tpl 

Find

{$legal_free_text|escape:'html':'UTF-8'|nl2br}

Add above

{$sokOrderComment}

To show total weight in PDF invoice, see PrestaShop show total product weight in PDF invoice

Back to PrestaShop

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *