PrestaShop show order comment in PDF invoice
To show user comment in PrestaShop PDF invoice
Edit file classes/pdf/HTMLTemplateInvoice.php
1 |
vi classes/pdf/HTMLTemplateInvoice.php |
Inside function getContent(), find around line 161
1 |
$carrier = new Carrier((int) $this->order->id_carrier); |
Add below
1 |
$sokOrderComment = $this->order->getFirstMessage(); |
In the same file, around line 333, find the $array variable, inside it, add
1 |
'sokOrderComment' => $sokOrderComment, |
Edit file pdf/invoice.tpl
1 |
vi pdf/invoice.tpl |
Find
1 |
{$legal_free_text|escape:'html':'UTF-8'|nl2br} |
Add above
1 |
{$sokOrderComment}<br/> |
To show total weight in PDF invoice, see PrestaShop show total product weight in PDF invoice
Back to PrestaShop