Jump to content

Add DNI value of ps_address to $invoice_address


guidocx84

Recommended Posts

Hi everybody,

I need to add the DNI number (situated in ps_address table) to the $invoice_address that is printed on the PDF invoice by /pdf/invoice.tpl. But I'm not able to find in the directories wich is the file that has to be modified to insert this information in the next invoices that I'll generate. Thank you very much!

Link to comment
Share on other sites

/pdf/invoice.tpl

/pdf/invoice-b2b.tpl

 

Good luck

 

Hi mytwocentimes and thank you for your answer!

I saw that files but I also saw that these files use the $invoice_address variable instead of the single variables... that because $invoice_address is composed by name, surname, address, zip, etc.

What I need is to add the dni (that is in my ps_address table) to the array that compose the $invoce_address variable, the one that is inserted in the PDF file. Do you know how can I do? Thanks a lot!

Link to comment
Share on other sites

This [HERE] may help

 

 

I'm nothing more than a hack and my solutions are ugly - good luck

 

You're much more than a hack and your solution could be a solution... You answered me... so it's just something important! :D

Let me verify tomorrow because I'm not at work... I see the array... the problem is that that file is from Prestashop 1.3 and I need the trick for Prestashop 1.5.2... but I don't know if things remain the same in this case.

File name is PaymentModule.php... maybe it's not the file that I need to modify but can be a trace...

Thank you by now! Have a nice night! ;)

Link to comment
Share on other sites

Ok... I understand... this setting is inserted in ps_address_format table and you can change this setting also from backoffice going to Localization -> Nations -> Name of the nation to modify -> Address Layout.

What you need is only insert the "dni" value where you want it.

 

NOW, there is another problem: how can I insert a label for all these fields (i.e. C.F.: the dni)?? I try to add something in the same page using '' or "" but the field disappear from the layout. Does somebody know how can I do this?

Thank you!

Link to comment
Share on other sites

  • 4 months later...

NOW, there is another problem: how can I insert a label for all these fields (i.e. C.F.: the dni)?? I try to add something in the same page using '' or "" but the field disappear from the layout. Does somebody know how can I do this?

Thank you!

 

Anyone have a solution for this problem?

 

One more question, if i want to show the dni in other separate place (not in the address), how can i show it in the invoice?

Link to comment
Share on other sites

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...