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

Advertisement

$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

Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement