Jump to content

Invoice PDF - How To Change Order Of Invoice Address


Recommended Posts

Hello,

 

In my invoice.tpl file i can see that the order details appears in the invoice.pdf via the command: {$invoice_address}

 

BUT this is fixed by default to appears a specific order of details:

 

Name LastName

Address

Postal Code, City

etc...

 

How can i change this order of details to make it have the address on top of the order?

 

Thanks a lot guys!

Link to comment
Share on other sites

Hello,

 

In my invoice.tpl file i can see that the order details appears in the invoice.pdf via the command: {$invoice_address}

 

BUT this is fixed by default to appears a specific order of details:

 

Name LastName

Address

Postal Code, City

etc...

 

How can i change this order of details to make it have the address on top of the order?

 

Thanks a lot guys!

 

It is about Address format. Go to Localization > Countries and change Address format for every country.

Link to comment
Share on other sites

Thanks a lot. I found the solution before 5 minutes :)

 

Can you tell me if is possible to add labels in my invoice.pdf before each detail?

 

For Example if i want to make it like this:

 

NAME/SURNAME: Name LastName

ADDRESS: Address

P.CODE/CITY: Postal Code, City

 

its hard for me to do it because in invoice.tpl use only this variable {$invoice_address} to pass the details.

 

i tried something ike this {$invoice_address.address1} or {$invoice_address->address1} in order to put a label in front of each variable but it doesnt work.

 

Can you help? Thanks a lot!

Link to comment
Share on other sites

No, it is not possible. The $invoice_address variable is created by the AddressFormat::generateAddress function.

 

You can create new address data for every address field (like firstname, lastname, ...) and use them in your template instead of {$invoice_address}. So it would look like:

{l s='Name:' pdf='true'} {$my-firstname} {$my-lastname}<br />
{l s='Address:' pdf='true'} {$my-address}<br />
...
Link to comment
Share on other sites

When a user buy a product from my store then the invoice send to him automatically of course. How can i get his firstname,lastname,address,etc dynamically to insert these details in my invoice.tpl? Which command i have to use? As i told you before i am trying to use something like this{l s='Name:' pdf='true'} {$invoice_address.address1} or {l s='Name:' pdf='true'{$invoice_address->address1} but it doesnt work. How can i create new address data?

 

Really Thanks!

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