'.$this->l('Summary of my order' ).'
+'.$this->l('Summary of my order' ).' (#'.(int)$params['order']->id.')
+'.$this->l('Order Status').'
+'.($currentState->id == 8?'':($currentState->id == 18?'':'')).' '.$currentState->name.'
+'.$this->l('My Cart').'
- ';
@@ -192,7 +199,7 @@ class BlockOrderSummary extends Module {
foreach($data['delivery_date'] as $k => $date) {
if($k == 1) {
echo '
- '.$this->l('Date de réception prévue entre le').' '.date('d/m/Y',strtotime($date['date_start'])).' '.$this->l('et le').' '.date('d/m/Y',strtotime($date['date_start'])).' + '.$this->l('Date de réception prévue entre le').' '.$date['date_start']->format('d/m/Y').' '.$this->l('et le').' '.$date['date_end']->format('d/m/Y').'
'; } elseif ($k == 5){ echo ''.$this->l('Livraison prévue avant le').' '.$this->l('24/12').'
'; @@ -213,7 +220,7 @@ class BlockOrderSummary extends Module { } } - public function getOrderDetail($cart,$id_lang){ + public function getOrderDetail($cart,$id_lang, $order = null){ if(Db::getInstance()->getValue(' SELECT `id_carrier` FROM `'._DB_PREFIX_.'carrier` @@ -278,7 +285,11 @@ class BlockOrderSummary extends Module { $delay_products = SaleDelay::associateDelay($products); $delays = array_keys($delay_products); - $date = new DateTime(); + if ($order!=null) { + $date = new DateTime($order->date_add); + } else { + $date = new DateTime(); + } $delivery_date = SaleDelay::getDeliveryDate($delays, null, $date, true); foreach($delays as $delay) {