fireatwire Posted January 25, 2022 Share Posted January 25, 2022 Hi! I would like to just show the billing address on the invoice when it equals the delivery address. If it is exactly the same address, it doesn't make sense to have it twice on the PDF invoice. How can I change it? Something like {if $delivery_address == $invoice_address} $invoice_address else <tr> <td width="50%">{if $delivery_address}<span class="bold">{l s='Delivery Address' d='Shop.Pdf' pdf='true'}</span><br/> {$delivery_address} {/if} </td> <td width="50%"><span class="bold">{l s='Billing Address' d='Shop.Pdf' pdf='true'}</span><br/> {$invoice_address} </td> </tr> Link to comment Share on other sites More sharing options...
El Patron Posted January 25, 2022 Share Posted January 25, 2022 maybe it does not make sense but it's hardly important, to play with it make sure you do so on a copy of your production shop. Link to comment Share on other sites More sharing options...
Ress Posted March 5, 2022 Share Posted March 5, 2022 (edited) You can compare their ids to see if they are the same. {if $addresses.invoice.id eq $addresses.delivery.id} like this {if $addresses.invoice.id eq $addresses.delivery.id} <tr> <td width="100%" colspan="2"><span class="bold">{l s='Billing Address' d='Shop.Pdf' pdf='true'}</span><br/> {$invoice_address} </td> </tr> {else} <tr> <td width="50%"> {if $delivery_address}<span class="bold">{l s='Delivery Address' d='Shop.Pdf' pdf='true'}</span><br/> {$delivery_address} {/if} </td> <td width="50%"><span class="bold">{l s='Billing Address' d='Shop.Pdf' pdf='true'}</span><br/> {$invoice_address} </td> </tr> {/if} Edited March 5, 2022 by Ress (see edit history) 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