How to use locolized shipping addresses in pdf invoice

  • Posts: 52
  • Thank you received: 4
  • Hikashop Multisite
1 year 3 months ago #347655

-- url of the page with the problem -- : www.autovakshop.nl

I am using the attach pdf invoice plugin. It works good, only for the shipping address is see Mr instead of Dhr. In the billing addres it is correct.

To make the shipping and billing addres I am usign the following code in invoice.php:

$shipping_address = sprintf("%s<br/>%s %s %s<br/>%s %s<br/>%s %s<br/>%s",
$order->shipping_address->address_company,
$order->shipping_address->address_title,
$order->shipping_address->address_firstname,
$order->shipping_address->address_lastname,
$order->shipping_address->address_street,
$order->shipping_address->address_streetnumber,
$order->shipping_address->address_post_code,
$order->shipping_address->address_city,
$order->shipping_address->address_country_name_english,

);

$invoice_address = $addressClass->displayAddress($order->fields, $order->$oneAddress, $view);


What am I doing wrong?

Please Log in or Create an account to join the conversation.

  • Posts: 81423
  • Thank you received: 13056
  • MODERATOR
1 year 3 months ago #347659

Hi,

Change :
$order->shipping_address->address_title
to:
hikashop_translate($order->shipping_address->address_title)

and you should have the title in the correct language.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum