Skip to main content

How to use locolized shipping addresses in pdf invoice

More
3 years 9 months ago #347655 by Ginius
-- 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.

More
3 years 9 months ago #347659 by nicolas
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.154 seconds
Powered by Kunena Forum