From 276cc9a2b6db21f199c20401ce99f2d007eb00f1 Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Mon, 4 Jul 2016 17:30:04 +0200 Subject: [PATCH] sending email when order delivery address is modified in BO --- adm/scaddressedit.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/adm/scaddressedit.php b/adm/scaddressedit.php index e9252935..ecc22809 100644 --- a/adm/scaddressedit.php +++ b/adm/scaddressedit.php @@ -48,6 +48,25 @@ if($address) { cedoorcode2 = "'.pSQL(Tools::getValue('cedoorcode2', '')).'", prid = "'.pSQL(Tools::getValue('prid', '')).'" WHERE id_cart = '.pSQL(intval(Tools::getValue('id_cart')))); + + $order = Db::getInstance()->getRow(' + SELECT date_add,id_order + FROM `'._DB_PREFIX_.'ps_orders` + WHERE id_cart = '.pSQL(intval(Tools::getValue('id_cart'))).' + '); + + mail('marion@antadis.com', '[BBB] Modif transporteur BO', + 'ID Customer : ' . $address['id_customer']. + ' , ID Order : ' . $order['id_order']. + ' , Date Order : ' . $order['date_add']. + ' , Date now : ' . date("Y-m-d H:i:s"). + ' , ID cart : ' . Tools::getValue('id_cart'). + ' , Mode en date : '.$address['delivery_mode'].' -- remplacé par : ' .Tools::getValue('delivery_mode', 'NULL'). + ' , Address1 en date : '.$address['pradress1'].' -- remplacé par : ' .Tools::getValue('pradress1', 'NULL'). + ' , Address2 en date : '.$address['pradress2'].' -- remplacé par : ' .Tools::getValue('pradress2', 'NULL'). + ' , Address3 en date : '.$address['pradress3'].' -- remplacé par : ' .Tools::getValue('pradress3', 'NULL'). + ' , Address4 en date : '.$address['pradress4'].' -- remplacé par : ' .Tools::getValue('pradress4', 'NULL') + ); } ?>