Jump to content

Invoice number in PDF invoice


fast

Recommended Posts

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 by fast (see edit history)
Link to comment
Share on other sites

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 by fast (see edit history)
Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...