fast Posted May 30, 2013 Share Posted May 30, 2013 (edited) Hi there, I would like to change my pdf invoice layout. I'd need a (smarty) variable containing the invoice number as defined in the backend. You can set a prefix there and select the starting number. So far I can show the internal ID of the invoice which outputs something like "70" or so: <span style="font-size: 10pt; color: #000;">Invoice number: {$order->id} </span></td> As you can see I am using the germaNext module' date=' my Prestashop version is 1.5.3.1. The name of the pdf file generated and attached to the email is btw exactly what I would want inside the pdf. It looks like INV00001.pdf. I have already tried to add the value in the PaymentModule.php file but with no success unfortunately . Can anyone point me to the right direction? Thank you! fast Edited May 30, 2013 by fast (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted May 30, 2013 Share Posted May 30, 2013 Did you try to use $order->invoice_number already? 1 Link to comment Share on other sites More sharing options...
fast Posted May 30, 2013 Author Share Posted May 30, 2013 (edited) Thanks for the hint! I have combined it with using string_format from smarty and now I've got what I initially wanted: <span style="font-size: 10pt; color: #000;">Invoice number: {$order->invoice_number|string_format:"S%06d"} </span> It outputs "INV000569" for the invoice number . It does not work in modules/germanext/mails/de/order_conf.html though, it just literally outputs my smarty string there… fast Edited May 30, 2013 by fast (see edit history) Link to comment Share on other sites More sharing options...
fast Posted May 31, 2013 Author Share Posted May 31, 2013 Is there a way to access the invoice prefix set in backend? Link to comment Share on other sites More sharing options...
Pete78 Posted August 2, 2013 Share Posted August 2, 2013 Yes, go to Invoices screen in tab "orders" and scroll down. There you can choose your prefix Link to comment Share on other sites More sharing options...
estpost Posted May 29, 2015 Share Posted May 29, 2015 A few years later, but maybe useful for someone. To output invoice prefix in smarty (in PDF template): {Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id)} 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