nicolas wrote: You should try something like that instead:
echo JText::sprintf('HI_CUSTOMER',@{$data->order_addresses[$data->cart->billing_address->address_id]}->address_firstname);
This code works for me if I leave out the {}.
So I am doing it like this:
<?php
$title = @$data->order_addresses[$data->cart->billing_address->address_id]->address_title;
if($title === "Herr") {
echo JText::sprintf('Sehr geehrter Herr %s,', @$data->order_addresses[$data->cart->billing_address->address_id]->address_lastname);
}
else if($title === "Frau") {
echo JText::sprintf('Sehr geehrte Frau %s,', @$data->order_addresses[$data->cart->billing_address->address_id]->address_lastname);
}
else {
echo JText::sprintf('HI_CUSTOMER',@$data->customer->name);
}
?>
At the moment I am wondering why it goes through the last "else" in the ORDER_STATUS_NOTIFICATION. It seems that $title is blank.
Why? And how to read out the title then?
In the ORDER_CREATION_NOTIFICATION it works fine.