Country display
This commit is contained in:
parent
45d340ac64
commit
056d5a9f3f
@ -3018,12 +3018,24 @@ class AdminOrders extends AdminTab
|
||||
AND `MR_Selected_Num` IS NOT NULL
|
||||
');
|
||||
if($mr) {
|
||||
switch ($res['MR_Selected_Pays']) {
|
||||
case 'FR':
|
||||
$mr['MR_Selected_Pays_Display'] = 'FRANCE';
|
||||
break;
|
||||
case 'ES':
|
||||
$mr['MR_Selected_Pays_Display'] = 'ESPAGNE';
|
||||
break;
|
||||
default:
|
||||
$mr['MR_Selected_Pays_Display'] = '..';
|
||||
break;
|
||||
}
|
||||
|
||||
$order_address = nl2br(preg_replace("/(\r\n){2,}/", "\r\n", implode("\r\n", array(
|
||||
$mr['MR_Selected_LgAdr1'],
|
||||
$mr['MR_Selected_LgAdr2'],
|
||||
$mr['MR_Selected_LgAdr3'] . ' ' . $mr['MR_Selected_LgAdr4'],
|
||||
$mr['MR_Selected_CP'] . ' ' . $mr['MR_Selected_Ville'],
|
||||
'FRANCE',
|
||||
$mr['MR_Selected_Pays_Display'],
|
||||
'Point Relais : '.$mr['MR_Selected_Num']
|
||||
))));
|
||||
} else {
|
||||
|
@ -485,29 +485,39 @@ class MondialRelay extends Module
|
||||
WHERE s.`id_cart` = '.(int)$params['order']->id_cart;
|
||||
$res = Db::getInstance()->getRow($sql);
|
||||
|
||||
if (!$res)
|
||||
if (!$res) {
|
||||
return;
|
||||
}
|
||||
|
||||
$point_relais = $res['MR_Selected_LgAdr1'].
|
||||
($res['MR_Selected_LgAdr1'] ? ' <br/> ' : '').$res['MR_Selected_LgAdr2'].
|
||||
($res['MR_Selected_LgAdr2'] ? ' <br/> ' : '').$res['MR_Selected_LgAdr3'].
|
||||
($res['MR_Selected_LgAdr3'] ? ' <br/> ' : '').$res['MR_Selected_LgAdr4'].
|
||||
($res['MR_Selected_LgAdr4'] ? ' <br/> ' : '').$res['MR_Selected_CP'].' '.
|
||||
$res['MR_Selected_Ville'].' <br/> '.$res['MR_Selected_Pays'];
|
||||
|
||||
|
||||
if (($res['dlv_mode'] == 'LD1') || ($res['dlv_mode'] == 'LDS') || ($res['dlv_mode'] == 'HOM'))
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'mr_url' => $res['url_suivi']
|
||||
));
|
||||
else
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'mr_addr' => $point_relais,
|
||||
'mr_url' => $res['url_suivi']
|
||||
));
|
||||
|
||||
($res['MR_Selected_LgAdr1'] ? ' <br/> ' : '').$res['MR_Selected_LgAdr2'].
|
||||
($res['MR_Selected_LgAdr2'] ? ' <br/> ' : '').$res['MR_Selected_LgAdr3'].
|
||||
($res['MR_Selected_LgAdr3'] ? ' <br/> ' : '').$res['MR_Selected_LgAdr4'].
|
||||
($res['MR_Selected_LgAdr4'] ? ' <br/> ' : '').$res['MR_Selected_CP'].' '.
|
||||
$res['MR_Selected_Ville'].' <br/> ';
|
||||
|
||||
switch ($res['MR_Selected_Pays']) {
|
||||
case 'FR':
|
||||
$point_relais .= 'FRANCE';
|
||||
break;
|
||||
case 'ES':
|
||||
$point_relais .= 'ESPAGNE';
|
||||
break;
|
||||
default:
|
||||
$point_relais .= '..';
|
||||
break;
|
||||
}
|
||||
|
||||
if (($res['dlv_mode'] == 'LD1') || ($res['dlv_mode'] == 'LDS') || ($res['dlv_mode'] == 'HOM')) {
|
||||
$this->context->smarty->assign(array('mr_url' => $res['url_suivi']));
|
||||
}
|
||||
else {
|
||||
$this->context->smarty->assign(array(
|
||||
'mr_addr' => $point_relais,
|
||||
'mr_url' => $res['url_suivi']
|
||||
));
|
||||
}
|
||||
|
||||
return $this->fetchTemplate('/views/templates/front/', 'order_detail');
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,9 @@
|
||||
<li class="address_title">Mondial Relay</li>
|
||||
<li>
|
||||
{if isset($mr_addr) && $mr_addr}
|
||||
<p id="dateofdelivery"><b style="text-transform:none;">{l s='Delivery to your Point Relais®' mod='mondialrelay'}</b> <br />{$mr_addr|escape:'UTF-8'}</p>
|
||||
<p id="dateofdelivery">
|
||||
<b style="text-transform:none;">{l s='Delivery to your Point Relais®' mod='mondialrelay'}</b> <br />
|
||||
{$mr_addr|escape:'UTF-8'}</p>
|
||||
{/if}
|
||||
{if $mr_url}
|
||||
<a href="{$mr_url|escape:'htmlall':'UTF-8'}" target="_blank">{l s='Follow my package on Mondial Relay website' mod='mondialrelay'}.</a>
|
||||
|
Loading…
Reference in New Issue
Block a user