isLoggedBack() && $cart = Tools::getValue('id_cart')) { $address = Db::getInstance()->getRow(' SELECT * FROM `'._DB_PREFIX_.'socolissimo_delivery_info` WHERE id_cart = '.pSQL(intval(Tools::getValue('id_cart'))).' '); if($address) { if(Tools::getValue('getPR') && ($h_xcoords = (float) Tools::getValue('h_xcoords')) && ($h_ycoords = (float) Tools::getValue('h_ycoords'))) { $pr_list = array(); // ± 10km radius header('Content-Type: text/json'); echo json_encode(Db::getInstance()->ExecuteS(' SELECT * FROM `'._DB_PREFIX_.'lapostews_pr` WHERE `ycoords` >= '.(float) $h_ycoords.' - 0.02 AND `ycoords` <= '.(float) $h_ycoords.' + 0.02 AND `xcoords` >= '.(float) $h_xcoords.' - 0.01 AND `xcoords` <= '.(float) $h_xcoords.' + 0.01 ')); exit; } if(isset($_POST['submitSC'])) { Db::getInstance()->Execute('UPDATE ps_socolissimo_delivery_info SET delivery_mode = "'.pSQL(Tools::getValue('delivery_mode', '')).'", prname = "'.pSQL(Tools::getValue('prname', '')).'", prfirstname = "'.pSQL(Tools::getValue('prfirstname', '')).'", cecompanyname = "'.pSQL(Tools::getValue('cecompanyname', '')).'", cename = "'.pSQL(Tools::getValue('cename', '')).'", cefirstname = "'.pSQL(Tools::getValue('cefirstname', '')).'", prcompladress = "'.pSQL(Tools::getValue('prcompladress', '')).'", pradress1 = "'.pSQL(Tools::getValue('pradress1', '')).'", pradress2 = "'.pSQL(Tools::getValue('pradress2', '')).'", pradress3 = "'.pSQL(Tools::getValue('pradress3', '')).'", pradress4 = "'.pSQL(Tools::getValue('pradress4', '')).'", przipcode = "'.pSQL(Tools::getValue('przipcode', '')).'", prtown = "'.pSQL(Tools::getValue('prtown', '')).'", cephonenumber = "'.pSQL(Tools::getValue('cephonenumber', '')).'", ceemail = "'.pSQL(Tools::getValue('ceemail', '')).'", cedeliveryinformation = "'.pSQL(Tools::getValue('cedeliveryinformation', '')).'", cedoorcode1 = "'.pSQL(Tools::getValue('cedoorcode1', '')).'", 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_.'orders` WHERE id_cart = '.pSQL(intval(Tools::getValue('id_cart'))).' '); /* Log modif Address to check errors */ if($address['prfirstname'] != $address['cefirstname'] || $address['cefirstname'] != Tools::getValue('cefirstname', '') || $address['cename'] != Tools::getValue('cename', '')) { $message = 'Modification address Socol -- id_order :'.$order['id_order']; $message .= ' -- ancien prfirstname : '.$address['prfirstname'].' remplacé par : '.Tools::getValue('prfirstname', ''); $message .= ' -- ancien cefirstname : '.$address['cefirstname'].' remplacé par : '.Tools::getValue('cefirstname', ''); $message .= ' -- ancien cename : '.$address['cename'].' remplacé par : '.Tools::getValue('cename', ''); Db::getInstance()->execute(' INSERT INTO `'._DB_PREFIX_.'ant_log` VALUES ( DEFAULT, '.(int) $cookie->id_employee.', "'.pSQL($message).'", NOW() ) '); } /* 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', ''). ' , Address1 en date : '.$address['pradress1'].' -- remplacé par : ' .Tools::getValue('pradress1', ''). ' , Address2 en date : '.$address['pradress2'].' -- remplacé par : ' .Tools::getValue('pradress2', ''). ' , Address3 en date : '.$address['pradress3'].' -- remplacé par : ' .Tools::getValue('pradress3', ''). ' , Address4 en date : '.$address['pradress4'].' -- remplacé par : ' .Tools::getValue('pradress4', ''). ' , Modif faite par : '.$cookie->id_employee );*/ } ?>

Livraison hors domicile - Recherche d\'un point de retrait

'; ?>