symdev Posted July 7, 2015 Share Posted July 7, 2015 Hello, I am trying to put the order id in the footer of the prestashop PDF invoice. For this I added this in the file /theme/mytheme/pdf/footer.tpl: {assign var="orderId" value="%05d"|sprintf:$order->id}{$orderId} However, when I go to orders > invoices and I generate a PDF, when there are more than one order, the last page of the PDF has the order id of the previous invoice... All the others are ok except for this one. Did I do something wrong or is it a prestashop or a tcpdf bug ? Link to comment Share on other sites More sharing options...
tuk66 Posted July 8, 2015 Share Posted July 8, 2015 I'm not sure if $order object is available in the footer. See the getFooter methid in /classes/pdf/HTMLTemplate.php. Link to comment Share on other sites More sharing options...
symdev Posted July 9, 2015 Author Share Posted July 9, 2015 Thank you tuk66, i assigned the order to smarty in getFooter() and now, on all the pages I have the order id of the next page, except for the last one which has the right one... Any idea ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now