public function getContent() { $delivery_address = new Address((int)$this->order->id_address_delivery); $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); $formatted_delivery_address = str_replace($delivery_address->phone, '', $formatted_delivery_address ); $formatted_delivery_address = str_replace($delivery_address->phone_mobile, '', $formatted_delivery_address ); $formatted_invoice_address = ''; if ($this->order->id_address_delivery != $this->order->id_address_invoice) { $invoice_address = new Address((int)$this->order->id_address_invoice); $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); $formatted_invoice_address = str_replace($invoice_address->phone, '', $formatted_invoice_address ); $formatted_invoice_address = str_replace($invoice_address->phone_mobile, '', $formatted_invoice_address ); }
In classes/pdf/HTMLTemplateDeliverySlip.php in der Funktion public function getContent() diese beiden Zeilen wie oben gezeigt hinzufügen:
$formatted_delivery_address = str_replace($delivery_address->phone, '', $formatted_delivery_address ); $formatted_delivery_address = str_replace($delivery_address->phone_mobile, '', $formatted_delivery_address );
Ebenso für die Rechnungsanschrift im folgenden if-Block (s.o.)
$formatted_invoice_address = str_replace($invoice_address->phone, '', $formatted_invoice_address ); $formatted_invoice_address = str_replace($invoice_address->phone_mobile, '', $formatted_invoice_address );
Eine weitere Möglichkeit, einen Parameter der Adresse auszuschließen ist:
$formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array('avoid' => array(1 => 'Country:name')), '<br />', ' ');
Quelle: Prestashop Forum
Schreibe einen Kommentar