Merge branch 'ticket-AideContact-SAV' into develop
This commit is contained in:
commit
938d7ead76
@ -195,7 +195,7 @@ class BlockOrderSummary extends Module {
|
||||
);
|
||||
//$carrier_socol = array(38,40,45);// local
|
||||
$carrier_socol = array(45,47,48);// dev
|
||||
//$carrier_socol = array();// prod
|
||||
//$carrier_socol = array(87,88,89);// prod
|
||||
echo '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
<div id="blockordersummary">
|
||||
<div class="content">
|
||||
@ -253,10 +253,10 @@ class BlockOrderSummary extends Module {
|
||||
<div>
|
||||
<h5>'.$this->l('My shipping address').' '.
|
||||
(
|
||||
($currentState->id != 8 && $currentState->id != 18 && in_array((int)$cart->id_carrier, $carrier_socol))
|
||||
($currentState->id != 8 && $currentState->id != 18 && $data['is_socol'])
|
||||
?'<a id="modif_address" data-url="scaddressedit.php?id_cart='.(int)$params['order']->id_cart.'"><span class="anticon anticon-pencil" style="font-size: 16px; vertical-align: baseline;cursor:pointer;"></span></a>'
|
||||
:(
|
||||
($currentState->id != 8 && $currentState->id != 18 && !in_array((int)$cart->id_carrier, $carrier_socol))
|
||||
($currentState->id != 8 && $currentState->id != 18 && !$data['is_socol'])
|
||||
?'<a href="?tab=AdminAddresses&id_address='.$addressDelivery->id.'&addaddress&realedit=1&id_order='.$params['order']->id.($addressDelivery->id == $addressInvoice->id ? '&address_type=1' : '').'&token='.Tools::getAdminToken('AdminAddresses'.(int)(Tab::getIdFromClassName('AdminAddresses')).(int)($cookie->id_employee)).'&back='.urlencode($_SERVER['REQUEST_URI']).'"><span class="anticon anticon-pencil" style="font-size: 16px; vertical-align: baseline;cursor:pointer;"></span></a>'
|
||||
:''
|
||||
)
|
||||
@ -294,12 +294,16 @@ class BlockOrderSummary extends Module {
|
||||
FROM `'._DB_PREFIX_.'socolissimo_delivery_info`
|
||||
WHERE `id_cart` = '.(int) $cart->id.'
|
||||
');
|
||||
|
||||
if($socol) {
|
||||
if($order == null && (int) $cart->id_carrier == 87) {
|
||||
$DOM_front = true;
|
||||
} else {
|
||||
$DOM_front = false;
|
||||
}
|
||||
if($socol && !$DOM_front) {
|
||||
$order_address = nl2br(preg_replace("/(\r\n){2,}/", "\r\n", implode("\r\n", array(
|
||||
$socol['cefirstname'].' '.$socol['cename'],
|
||||
$socol['cecompanyname'],
|
||||
$socol['prfirstname'].' '.$socol['prname'],
|
||||
$socol['prname'],
|
||||
$socol['prcompladress'],
|
||||
$socol['pradress1'],
|
||||
$socol['pradress2'],
|
||||
@ -312,10 +316,13 @@ class BlockOrderSummary extends Module {
|
||||
!empty($socol['cedoorcode2'])? 'Code porte 2 : '.$socol['cedoorcode2']: '',
|
||||
$socol['cedeliveryinformation'],
|
||||
))));
|
||||
$is_socol = true;
|
||||
} else {
|
||||
$is_socol = false;
|
||||
$order_address = nl2br(AddressFormat::generateAddress(new Address((int) $cart->id_address_delivery)));
|
||||
}
|
||||
} else {
|
||||
$is_socol = false;
|
||||
$order_address = nl2br(AddressFormat::generateAddress(new Address((int) $cart->id_address_delivery)));
|
||||
}
|
||||
|
||||
@ -369,6 +376,7 @@ class BlockOrderSummary extends Module {
|
||||
return array(
|
||||
'order_address' => $order_address,
|
||||
'carrier_name' => $carrier_name,
|
||||
'is_socol' => $is_socol,
|
||||
'delay_name' => $delay_name,
|
||||
'delivery_date' => (isset($delivery_date)?$delivery_date:null)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user