Fertig Posted May 12, 2016 Share Posted May 12, 2016 Hi, anybody knows how can i change the position of deliver adress AND billing to adress? fom --> company details --> deliver adress --> billing to adress CHANGE TO (position chnage deliver adress --> billing to adress --> company details se attached picture thanks for help best reg seb[ attachment=149147:unspecified.png] Link to comment Share on other sites More sharing options...
erouvier29 Posted May 13, 2016 Share Posted May 13, 2016 Simply reorder the <td>s in /pdf/invoice.addresses-tab.tpl (or in a copy of it to /themes/xxx/pdf/). Link to comment Share on other sites More sharing options...
Fertig Posted May 13, 2016 Author Share Posted May 13, 2016 Simply reorder the <td>s in /pdf/invoice.addresses-tab.tpl (or in a copy of it to /themes/xxx/pdf/). Hey erouvier29, thanks for your answer, can you write detail, cause i am not sure what you mean. thank you so much regards seb Link to comment Share on other sites More sharing options...
erouvier29 Posted May 13, 2016 Share Posted May 13, 2016 Original file /pdf/invoice.addresses-tab.tpl should contain: <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="33%"><span class="bold"> </span><br/><br/> {if isset($order_invoice)}{$order_invoice->shop_address}{/if} </td> <td width="33%">{if $delivery_address}<span class="bold">{l s='Delivery Address' pdf='true'}</span><br/><br/> {$delivery_address} {/if} </td> <td width="33%"><span class="bold">{l s='Billing Address' pdf='true'}</span><br/><br/> {$invoice_address} </td> </tr> </table> Change it with: <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="33%">{if $delivery_address}<span class="bold">{l s='Delivery Address' pdf='true'}</span><br/><br/> {$delivery_address} {/if} </td> <td width="33%"><span class="bold">{l s='Billing Address' pdf='true'}</span><br/><br/> {$invoice_address} </td> <td width="33%"><span class="bold"> </span><br/><br/> {if isset($order_invoice)}{$order_invoice->shop_address}{/if} </td> </tr> </table> Link to comment Share on other sites More sharing options...
Fertig Posted May 13, 2016 Author Share Posted May 13, 2016 wow cool ! thanks. and whats about the position, so the deliver adress position must be approx 5cm from left border and the billing to adress border right begins in the middle of the paper/template. the company adress must be at the right end. like i make a screenshot from the positions in the first post. Link to comment Share on other sites More sharing options...
Fertig Posted May 13, 2016 Author Share Posted May 13, 2016 mabe works with: original: 33% / 33% and 33% can i change it to: 5% / 50% 75% ?! Link to comment Share on other sites More sharing options...
erouvier29 Posted May 13, 2016 Share Posted May 13, 2016 Not really clean, but you can adjust the horizontal positions like this for example: <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="15%"></td> <td width="30%"> {if $delivery_address} <span class="bold">{l s='Delivery Address' pdf='true'}</span><br/><br/> {$delivery_address} {/if} </td> <td width="30%"> <span class="bold">{l s='Billing Address' pdf='true'}</span><br/><br/> {$invoice_address} </td> <td width="25%" style="text-align:right"> <span class="bold"> </span><br/><br/> {if isset($order_invoice)}{$order_invoice->shop_address}{/if} </td> </tr> </table> Shop address elements are right justified Sum of widths shall be 100% 1 Link to comment Share on other sites More sharing options...
Fertig Posted May 21, 2016 Author Share Posted May 21, 2016 Hey, thanks for your answer, that woks !! is it possible making the deliver adress and billing to like in the picture "NEW.png" ? best regards from Lucerne Not really clean, but you can adjust the horizontal positions like this for example: <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="15%"></td> <td width="30%"> {if $delivery_address} <span class="bold">{l s='Delivery Address' pdf='true'}</span><br/><br/> {$delivery_address} {/if} [attachment=149664:NEW.png] </td> <td width="30%"> <span class="bold">{l s='Billing Address' pdf='true'}</span><br/><br/> {$invoice_address} </td> <td width="25%" style="text-align:right"> <span class="bold"> </span><br/><br/> {if isset($order_invoice)}{$order_invoice->shop_address}{/if} </td> </tr> </table> Shop address elements are right justified Sum of widths shall be 100% Link to comment Share on other sites More sharing options...
erouvier29 Posted May 23, 2016 Share Posted May 23, 2016 Yes: 1. Decrease the size of left margin block and increase the one of delivery block 2. Remove label "Delivery address" 3. Insert "Suisii GmbH..." with desired formatting <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="5%"></td> <td width="40%"> {if $delivery_address} <span class="bold"> </span><br/> <span style="font-size:0.8em;color:#CCC;text-decoration:underline">Suissi GmbH...</span><br/> {$delivery_address} {/if} </td> <td width="30%"> <span class="bold">{l s='Billing Address' pdf='true'}</span><br/> <span style="font-size:0.8em"></span><br/> {$invoice_address} </td> <td width="25%" style="text-align:right"> <span class="bold"> </span><br/> <span style="font-size:0.8em"> </span><br/> {if isset($order_invoice)}{$order_invoice->shop_address}{/if} </td> </tr> </table> 1 Link to comment Share on other sites More sharing options...
Fertig Posted May 23, 2016 Author Share Posted May 23, 2016 that looks very cool, but i think now i have a problem... since i use your code, i cant chance any adressen?! ... everytime when i get a order all customers have the same adresse. when i change the adress, he dont change the adress to a new adress :-( Yes: 1. Decrease the size of left margin block and increase the one of delivery block 2. Remove label "Delivery address" 3. Insert "Suisii GmbH..." with desired formatting <table id="addresses-tab" cellspacing="0" cellpadding="0"> <tr> <td width="5%"></td> <td width="40%"> {if $delivery_address} <span class="bold"> </span><br/> <span style="font-size:0.8em;color:#CCC;text-decoration:underline">Suissi GmbH...</span><br/> {$delivery_address} {/if} </td> <td width="30%"> <span class="bold">{l s='Billing Address' pdf='true'}</span><br/> <span style="font-size:0.8em"></span><br/> {$invoice_address} </td> <td width="25%" style="text-align:right"> <span class="bold"> </span><br/> <span style="font-size:0.8em"> </span><br/> {if isset($order_invoice)}{$order_invoice->shop_address}{/if} </td> </tr> </table> Link to comment Share on other sites More sharing options...
erouvier29 Posted May 23, 2016 Share Posted May 23, 2016 (edited) Addresses remain the same, just as they have been set for the order. Only the label "Delivery address" has been removed from the template. But the address itself is still the one attached to the order, and will differ from one order to another. I just assumed that the line "Suissi GmbH..." is fixed, but maybe it's not the case. What is actually this line for? Is it relative to the order or globally defined? Is it stored somewhere into the database? Edited May 23, 2016 by erouvier29 (see edit history) Link to comment Share on other sites More sharing options...
Fertig Posted May 23, 2016 Author Share Posted May 23, 2016 another writes maybe its a template issue with overrides, dont know why. my experiences in database its like a child and fire, not good ... i have no idea from database, php and html a little bit... Link to comment Share on other sites More sharing options...
erouvier29 Posted May 24, 2016 Share Posted May 24, 2016 another writes maybe its a template issue with overrides, dont know why. Sorry, I don't understand what you mean Link to comment Share on other sites More sharing options...
Fertig Posted June 8, 2016 Author Share Posted June 8, 2016 Hello KerAwen, thanks for your fast and good support. sorry, i had a little bit work here so i cant write back. ... so now works after a update and looks very close the that design of invoice i want :-D Link to comment Share on other sites More sharing options...
eleazar Posted June 9, 2016 Share Posted June 9, 2016 Hi guys, instead of trial and error in percentage of the table you can easily adjust the margins precisely with a small override of function writePage of /classes/pdf/PDFgenerator.php. Just modify the left margin value in the following code and save it as override/classes/pdf/PDFgenerator.php <?php class PDFGenerator extends PDFGeneratorCore { public function writePage() { $this->SetHeaderMargin(5); $this->SetFooterMargin(18); $this->setMargins(10, 40, 10); $this->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); } } Link to comment Share on other sites More sharing options...
nlsweb Posted March 17, 2017 Share Posted March 17, 2017 I want to change few thing in the invoice that customer received and we received as a order confirmation {if !empty($delivery_address)}<table style="width: 100%"><tr><td style="width: 50%"><span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Delivery Address' pdf='true'}</span><br />{$delivery_address}</td><td style="width: 50%"><span style="font-weight: bold; font-size: 10pt; color: #9E9F9E">{l s='Senders Address' pdf='true'}</span><br />{$invoice_address}</td></tr></table> So basically I dont know where $delivery_address and $invoice_address are coming from. I want to change the way display $invoice_address i.e. I just want to just show client name and phone number $delivery_address i just want to delivery person name and address and phone. Can someone help me that how and where I can change the code. Thank you 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