TailgunnerMedia Posted September 24, 2012 Share Posted September 24, 2012 I'm trying to add the customer's phone number to the PDF invoice that is generated. I would like to have the phone number show up under the Delivery and Invoicing addresses. I've looked at PDF.php but don't know where to start. Any help would be awesome. Thanks! Link to comment Share on other sites More sharing options...
TailgunnerMedia Posted September 25, 2012 Author Share Posted September 25, 2012 Did some more digging and found that if a customer only provides a "Mobile Number" then it will not show up on their invoice. If they provide a "Home Number" then it will show up on their invoice. Is there a way to have both numbers show on the invoice? Link to comment Share on other sites More sharing options...
bellini13 Posted September 29, 2012 Share Posted September 29, 2012 (edited) there are typically 2 ways to resolve this assuming you are using a current version 1.4 prestashop 1) address format is configured per Country. So you go into the Country settings, and add phone_mobile to the address format. Doing this will alter the address format across the site, not only the PDF invoice 2) customize the PDF.php class to ignore the address format, and display the phone number if it exists. Edited October 13, 2012 by bellini13 (see edit history) 1 Link to comment Share on other sites More sharing options...
TailgunnerMedia Posted October 1, 2012 Author Share Posted October 1, 2012 The first way worked perfectly! Thanks for the help! Link to comment Share on other sites More sharing options...
dvien_h_ali Posted February 29, 2016 Share Posted February 29, 2016 (edited) Phone number and mobile number exist in country setting but still they do not show up in invoice. How can I add them into invoice? Edited February 29, 2016 by dvien_h_ali (see edit history) Link to comment Share on other sites More sharing options...
dvien_h_ali Posted February 29, 2016 Share Posted February 29, 2016 {$delivery_address} shows different results in delivery slip and invoice pdf. In invoice it does not show phone and mobile number but in deliver slip it shows both of them. Can someone please explain why does {$delivery_address} show different results? I want {$delivery_address} in invoice to show phone and mobile number as well. Link to comment Share on other sites More sharing options...
francky65 Posted March 1, 2016 Share Posted March 1, 2016 {$delivery_address} shows different results in delivery slip and invoice pdf. In invoice it does not show phone and mobile number but in deliver slip it shows both of them. Can someone please explain why does {$delivery_address} show different results? I want {$delivery_address} in invoice to show phone and mobile number as well. I Have the same problem : everything is OK on the delivery slip, but phone & mail doesn't show on the Invoice...have you find a solution ? Link to comment Share on other sites More sharing options...
dvien_h_ali Posted March 1, 2016 Share Posted March 1, 2016 I Have the same problem : everything is OK on the delivery slip, but phone & mail doesn't show on the Invoice...have you find a solution ? I am still looking for it. Link to comment Share on other sites More sharing options...
Eolia Posted March 1, 2016 Share Posted March 1, 2016 Yes, it's an idiot new feature see here (in french, sorry): https://www.prestashop.com/forums/topic/468694-transporteur-et-numeros-de-telephone-manquants-dans-facture-v161/page-2?do=findComment&comment=2235421 Link to comment Share on other sites More sharing options...
dvien_h_ali Posted March 1, 2016 Share Posted March 1, 2016 (edited) Yes, it's an idiot new feature see here (in french, sorry): https://www.prestashop.com/forums/topic/468694-transporteur-et-numeros-de-telephone-manquants-dans-facture-v161/page-2?do=findComment&comment=2235421 That worked for me, but there is one thing I do not understand that line {"avoid":["vat_number","phone","phone_mobile"]} in the database was there for both the delivery and invoice. But before deleting them the delivery slip didn't have any problem. it was still showing the phone number and mobile number. Edited March 1, 2016 by dvien_h_ali (see edit history) Link to comment Share on other sites More sharing options...
francky65 Posted March 2, 2016 Share Posted March 2, 2016 Yes, it's an idiot new feature see here (in french, sorry): https://www.prestashop.com/forums/topic/468694-transporteur-et-numeros-de-telephone-manquants-dans-facture-v161/page-2?do=findComment&comment=2235421 It worked for me, but only for new invoices ! Thanks Link to comment Share on other sites More sharing options...
Eolia Posted March 2, 2016 Share Posted March 2, 2016 Yes because data are already stored in the old format in database 1 Link to comment Share on other sites More sharing options...
Sebinj Posted April 25, 2016 Share Posted April 25, 2016 $delivery_address = new Address((int)$this->order->id_address_delivery); $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); Add these lines to getcontent() after $delivery_address of HTMLTemplateInvoice.php Link to comment Share on other sites More sharing options...
ernexus Posted May 4, 2016 Share Posted May 4, 2016 Added the phone number to the invoice address : $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); $delivery_address = new Address((int)$this->order->id_address_delivery); $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); Link to comment Share on other sites More sharing options...
globosoftware.net Posted May 12, 2016 Share Posted May 12, 2016 You can use the module to display phone number to invoice. http://addons.prestashop.com/en/21817-advanced-invoice-builder.html By the way, the module not only display phone number, there are ton of other options & you can easy to custom your invoice. Link to comment Share on other sites More sharing options...
domorodecmezilidmi Posted July 27, 2016 Share Posted July 27, 2016 Hi just a question - when you modify your file manually so after new upgrade all data will be lost right? so if you change data manually not using some module you are facing big problem after security update....my op. Link to comment Share on other sites More sharing options...
globosoftware.net Posted July 28, 2016 Share Posted July 28, 2016 Hi just a question - when you modify your file manually so after new upgrade all data will be lost right? so if you change data manually not using some module you are facing big problem after security update....my op. You are correct. if you are using the module http://addons.prestashop.com/en/21817-advanced-invoice-delivery-pdf-builder.html you will not care about update in furture. 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