democolis Posted August 24, 2015 Share Posted August 24, 2015 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 More sharing options...
tuk66 Posted August 25, 2015 Share Posted August 25, 2015 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 More sharing options...
democolis Posted August 25, 2015 Author Share Posted August 25, 2015 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 More sharing options...
tuk66 Posted August 25, 2015 Share Posted August 25, 2015 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 More sharing options...
democolis Posted August 25, 2015 Author Share Posted August 25, 2015 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 More sharing options...
tuk66 Posted August 25, 2015 Share Posted August 25, 2015 See /classes/pdf/HTMLTemplateInvoice.php/getContent(). Add new data there. Link to comment Share on other sites More sharing options...
democolis Posted August 25, 2015 Author Share Posted August 25, 2015 Thanks for your time! Can you give me an example of how can i add a new data for first name? I am using version 1.6.0.14! 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