<table width="100%">
<tr>
<?php if($this->invoice_type=='full' && !empty($this->element->billing_address)){?>
<td>
<fieldset class="adminform" id="htmlfieldset_billing">
<legend style="background-color: #FFFFFF;"><?php echo JText::_('HIKASHOP_BILLING_ADDRESS'); ?></legend>
<?php
$this->setLayout('address_template');
$html = $this->loadTemplate();
foreach($this->element->fields as $field){
$fieldname = $field->field_namekey;
$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$this->element->billing_address->$fieldname),$html);
}
echo str_replace("\n","<br/>\n",trim(str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)),"\n"));
[b]/**
* Affichage email + username
*/
$userClass = hikashop_get('class.user');
$user = $userClass->get($this->order->order_user_id); ?>
<br/>
<? echo 'username: '.$user->username;?>
<br/>
<? echo 'email: '.$user->email;[/b]
?>
</fieldset>
</td>
<?php }?>
<td>
<?php
if(!empty($this->element->order_shipping_id) && !empty($this->element->shipping_address)){
?>
<fieldset class="adminform" id="htmlfieldset_shipping">
<legend style="background-color: #FFFFFF;"><?php echo JText::_('HIKASHOP_SHIPPING_ADDRESS'); ?></legend>
<?php
if(empty($this->element->override_shipping_address)) {
$this->setLayout('address_template');
$html = $this->loadTemplate();
foreach($this->element->fields as $field){
$fieldname = $field->field_namekey;
$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$this->element->shipping_address->$fieldname),$html);
}
echo str_replace("\n","<br/>\n",trim(str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)),"\n"));
} else {
echo $this->element->override_shipping_address;
}
?>
</fieldset>
<?php
}
?>
</td>
</tr>
</table>
et j'obtiens l'affichage en pièce jointe.
Si vous pouvez m'aidez à comprendre, je vous en remercie d'avance.
Cordialement.