From ed05b99b6522a7c81b6a31b68ee781996ed252e4 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Fri, 4 Nov 2016 14:56:33 +0100 Subject: [PATCH] bug fixes --- modules/blockordersummary/blockordersummary.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/blockordersummary/blockordersummary.php b/modules/blockordersummary/blockordersummary.php index b0d71c26..9aa755cc 100644 --- a/modules/blockordersummary/blockordersummary.php +++ b/modules/blockordersummary/blockordersummary.php @@ -194,8 +194,8 @@ class BlockOrderSummary extends Module { WHERE od.`id_order` ='. (int)$params['order']->id ); //$carrier_socol = array(38,40,45);// local - //$carrier_socol = array(45,47,48);// dev - $carrier_socol = array(87,88,89);// prod + $carrier_socol = array(45,47,48);// dev + //$carrier_socol = array(87,88,89);// prod echo '
@@ -253,10 +253,10 @@ class BlockOrderSummary extends Module {
'.$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']) ?'' :( - ($currentState->id != 8 && $currentState->id != 18 && !in_array((int)$cart->id_carrier, $carrier_socol)) + ($currentState->id != 8 && $currentState->id != 18 && !$data['is_socol']) ?'' :'' ) @@ -316,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))); } @@ -373,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) );