From ef732eb1c5fa69d08df80f8a5d66df340bae9cb1 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Wed, 17 May 2017 17:24:47 +0200 Subject: [PATCH] start of resend parcel part --- .../AdminAntReturnprocess.php | 228 +++++++++--------- 1 file changed, 111 insertions(+), 117 deletions(-) diff --git a/modules/ant_returnprocess/AdminAntReturnprocess.php b/modules/ant_returnprocess/AdminAntReturnprocess.php index 479aed41..4327588f 100644 --- a/modules/ant_returnprocess/AdminAntReturnprocess.php +++ b/modules/ant_returnprocess/AdminAntReturnprocess.php @@ -633,18 +633,16 @@ class AdminAntReturnprocess extends AdminTab
-
-
'; - $return_link = Db::getInstance()->getRow(' - SELECT `return_number`, `link` - FROM `'._DB_PREFIX_.'order_return_link` - WHERE `id_order_return` = '.(int) $id_order_return.' - '); - $html .= '

Lien retour Etiquette MR : '.($return_link? ''.$return_link['return_number'].' ':'Pas de lien retour').'

'; - $html .='

-
+
'; + $return_link = Db::getInstance()->getRow(' + SELECT `return_number`, `link` + FROM `'._DB_PREFIX_.'order_return_link` + WHERE `id_order_return` = '.(int) $id_order_return.' + '); + $html .= '

Lien retour Etiquette MR : '.($return_link? ''.$return_link['return_number'].' ':'Pas de lien retour').'

'; + $html .= '

@@ -686,13 +684,12 @@ class AdminAntReturnprocess extends AdminTab
-
- '.($orderReturn->id ? '' : '').' +
'.$this->l('Changer le statut du retour').'
+
-
-
- +
+
@@ -922,127 +919,124 @@ class AdminAntReturnprocess extends AdminTab
-
+
+
+

Renvoyer un colis

+
+
+
+
+
+ EN COURS DE DEVELOPPEMENT ! +
+
+
+
-
-
-
-

SAV '.(isset($thread)?' Conversation #'.(int)($thread->id).'':'').'

-
-
-
-
-
'; - if(isset($thread)){ - if($thread->id_order == $orderReturn->id_order) { - $products = Db::getInstance()->ExecuteS(' - SELECT spc.*, pl.`name` - FROM `'._DB_PREFIX_.'support_product_customerthread` spc - LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = spc.`id_product`) - WHERE spc.`id_customer_thread` = '.(int)$thread->id.' - AND pl.`id_lang` = 2' - ); - if($products && !empty($products)) { - $html .='
Produit(s) Concerné(s)
'; - foreach ($products as $product) { - $img_path = ''; - $img = Db::getInstance()->getRow(' - SELECT id_image - FROM `'._DB_PREFIX_.'image` i - WHERE i.`id_product` = '.(int)$product['id_product'].' - AND i.`cover` = 1' - ); - if (isset($img['id_image']) && !empty($img['id_image'])) { - $image_obj = new Image((int)$img['id_image']); - $img_path = (isset($image_obj)?$image_obj->getExistingImgPath():''); - } - $html .=' - - '.mb_strimwidth($product['name'], 0, 55, "...").' -
-
'; +
+
+

SAV '.(isset($thread)?' Conversation #'.(int)($thread->id).'':'').'

+
+
+
+
+
'; + if(isset($thread)){ + if($thread->id_order == $orderReturn->id_order) { + $products = Db::getInstance()->ExecuteS(' + SELECT spc.*, pl.`name` + FROM `'._DB_PREFIX_.'support_product_customerthread` spc + LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (pl.`id_product` = spc.`id_product`) + WHERE spc.`id_customer_thread` = '.(int)$thread->id.' + AND pl.`id_lang` = 2' + ); + if($products && !empty($products)) { + $html .='
Produit(s) Concerné(s)
'; + foreach ($products as $product) { + $img_path = ''; + $img = Db::getInstance()->getRow(' + SELECT id_image + FROM `'._DB_PREFIX_.'image` i + WHERE i.`id_product` = '.(int)$product['id_product'].' + AND i.`cover` = 1' + ); + if (isset($img['id_image']) && !empty($img['id_image'])) { + $image_obj = new Image((int)$img['id_image']); + $img_path = (isset($image_obj)?$image_obj->getExistingImgPath():''); } + $html .=' + + '.mb_strimwidth($product['name'], 0, 55, "...").' +
+
'; } } - if($last_message){ - $html .='
Dernier Message '.($thread->id_order != $orderReturn->id_order?'
(Ne concerne pas cette commande)':'').'
'; - $last_message['message'] = preg_replace('/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui', '\1\2', html_entity_decode($last_message['message'], ENT_NOQUOTES, 'UTF-8')); + } + if($last_message){ + $html .='
Dernier Message '.($thread->id_order != $orderReturn->id_order?'
(Ne concerne pas cette commande)':'').'
'; + $last_message['message'] = preg_replace('/(https?:\/\/[a-z0-9#%&_=\(\)\.\? \+\-@\/]{6,1000})([\s\n<])/Uui', '\1\2', html_entity_decode($last_message['message'], ENT_NOQUOTES, 'UTF-8')); - if(!empty($last_message['employee_name'])) { - $html .=' -
-

Bébé Boutik - ('.Tools::displayDate($last_message['date_add'], (int)($cookie->id_lang), true).')

-

- "'.$last_message['message'].'" -

-
'; - } else { - $html .=' -
-

'.$customer->firstname.' '.$customer->lastname.' - ('.Tools::displayDate($last_message['date_add'], (int)($cookie->id_lang), true).')

-

- "'.$last_message['message'].'" -

-
'; - } - - $orderMessages = OrderMessage::getOrderMessages((int)($last_message['id_lang'])); + if(!empty($last_message['employee_name'])) { $html .='
-
Envoyer un message
-
-
- -
-
- -
-
- -
-
- - - - -
-
+

Bébé Boutik - ('.Tools::displayDate($last_message['date_add'], (int)($cookie->id_lang), true).')

+

+ "'.$last_message['message'].'" +

+
'; + } else { + $html .=' +
+

'.$customer->firstname.' '.$customer->lastname.' - ('.Tools::displayDate($last_message['date_add'], (int)($cookie->id_lang), true).')

+

+ "'.$last_message['message'].'" +

'; } - } else { - $html .='

Pas de conversation en rapport avec cette commande !

'; + + $orderMessages = OrderMessage::getOrderMessages((int)($last_message['id_lang'])); + $html .=' +
+
Envoyer un message
+
+
+ +
+
+ +
+
+ +
+
+ + + + +
+
+
'; } - $html .='
-
+ } else { + $html .='

Pas de conversation en rapport avec cette commande !

'; + } + $html .='
-
+
'; $html .= $helper->renderScript();