Jump to content

Add Phone Number to PDF Invoice


Recommended Posts

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 by bellini13 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 years later...

{$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

{$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

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 by dvien_h_ali (see edit history)
Link to comment
Share on other sites

  • 1 month later...
$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

  • 2 weeks later...

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

  • 2 months later...

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

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