Invalid order number in the preliminary pdf invoice
I am trying to put the order id in the footer of a prestashop PDF invoice. For that, I added this to the /theme/mytheme/pdf/footer.tpl file:
{assign var="orderId" value="%05d"|sprintf:$order->id}
{$orderId}
However, when I go to Orders> Invoices and I create a PDF when there are multiple orders, the last PDF page has the order ID of the previous invoice ... Everyone else is fine except this one.
Did I do something wrong or is it a preashop or tcpdf error?
UPDATE
A user on the prestashop forum suggested assigning an order variable for smarty in the getFooter () / classes / pdf / HTMLTemplate.php function. I did and now, on all pages I have the order id of the next page except the last one, which has the correct one ...
+3
source to share