From e75e1e61bbb9b135d409f2a8bd36c59a2b30e905 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 25 Jul 2017 16:56:59 +0200 Subject: [PATCH] fix from prod --- adm/mraddressedit.php | 141 ++++++++++++--------- modules/logistics/AdminLogistics.php | 111 +++++++++------- modules/mondialrelay/es.php | 30 ++++- modules/philea_magistor/cron.php | 5 +- modules/philea_magistor/cron_auto_sync.php | 2 +- modules/privatesales/Sale.php | 2 + 6 files changed, 178 insertions(+), 113 deletions(-) diff --git a/adm/mraddressedit.php b/adm/mraddressedit.php index bdb22f47..f84680a7 100644 --- a/adm/mraddressedit.php +++ b/adm/mraddressedit.php @@ -251,75 +251,98 @@ function updateForm(delivery_mode, address1, address2, address3, address4, postc $("input[name=MR_Selected_Ville]").val(city); $("input[name=MR_Selected_Num]").val(prid); } +function displayMap(results, status, is_city) { + if ( status === "OK" ) { + var lat = null; + var lng = null; + + if(results[0].geometry.location.H) { + lat = results[0].geometry.location.H; + lng = results[0].geometry.location.L; + } else if(results[0].geometry.location.G) { + lat = results[0].geometry.location.G; + lng = results[0].geometry.location.K; + } else { + var loc = results[0].geometry.location.toString().replace("(", "").replace(")", "").replace(" ", "").split(","); + lat = loc[0]; + lng = loc[1]; + } + + if(!is_city) { + $("#map_canvas").gmap("addMarker", {"icon": "http://static.privatesportshop.com/img/admin/marker_home.png", "idpr": "pr_home", "position": lat + "," + lng, "bounds": true}).click(function() { + $("#map_canvas").gmap("openInfoWindow", {"content": "Adresse actuelle"}, this); + }); + } + + '; + + for($i= 0, $l = count($relay_points); $i < $l; $i++) { + $relay = $relay_points[$i]; + + if($relay->Pays == "") { + continue; + } + + echo ' + $("#map_canvas").gmap("search", {"address": "'.htmlentities(preg_replace('/(, ){2,}/', ', ', preg_replace('/(, ){2,}/', ', ', implode(', ', array(trim($relay->LgAdr3), trim($relay->LgAdr2), trim($relay->LgAdr4), trim($relay->CP).' '.trim($relay->Ville), Country::getNameById(2, $relay->Pays != 'FR'? Country::getByIso($relay->Pays): 8))))), ENT_COMPAT | ENT_HTML401, 'UTF-8').'"}, function(results, status) { + if ( status === "OK" ) { + var lat = null; + var lng = null; + + if(results[0].geometry.location.H) { + lat = results[0].geometry.location.H; + lng = results[0].geometry.location.L; + } else if(results[0].geometry.location.G) { + lat = results[0].geometry.location.G; + lng = results[0].geometry.location.K; + } else { + var loc = results[0].geometry.location.toString().replace("(", "").replace(")", "").replace(" ", "").split(","); + lat = loc[0]; + lng = loc[1]; + } + + var prtext = ["", "'.htmlentities(trim($relay->LgAdr1), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr2), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr3), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr4), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities($relay->CP, ENT_COMPAT | ENT_HTML401, 'UTF-8').' '.htmlentities($relay->Ville, ENT_COMPAT | ENT_HTML401, 'UTF-8').'"].filter(function(x) { return x != ""; }).join("
"); + var prtext_action = "
Sélectionner"; + + markers.push($("#map_canvas").gmap("addMarker", { "id": "pr_'.htmlentities($relay->Num, ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "position": lat + "," +lng, "bounds": true, "content": prtext + prtext_action })); + markers[markers.length - 1].click(function() { + $("#map_canvas").gmap("openInfoWindow", {"content": $(this).attr("content")}, this); + }); + + var litem = $("
  • ").attr("data-index", '.$i.').html(prtext).click(function() { + $.each(markers, function(id, el) { + if(el[0].id == "pr_'.htmlentities(trim($relay->Num), ENT_COMPAT | ENT_HTML401, 'UTF-8').'") { + google.maps.event.trigger(el[0], "click"); + } + }); + $("#map_canvas").gmap("option", "center", markers[parseInt($(this).attr("data-index"))][0].getPosition()); + updateForm("24R", "'.htmlentities(trim($relay->LgAdr1), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr2), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr3), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr4), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->CP), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->Ville), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->Num), ENT_COMPAT | ENT_HTML401, 'UTF-8').'"); + }); + + $("#pr_list ul").append(litem); + } + });'; + } + echo ' + } +} + $(document).ready(function() { delivery_modes = {}; $("select[name=delivery_mode] option").each(function(id, el) { delivery_modes[$(el).attr("value")] = $(el).text(); }); + $("#map_canvas").gmap('.($pr_coords? '{ "center": "'.(float) $pr_coords['xcoords'].','.(float) $pr_coords['ycoords'].'" }': '').').bind("init", function(ev, map) {'; $current_address = htmlentities(preg_replace('/(, ){2,}/', ', ', preg_replace('/(, ){2,}/', ', ', implode(', ', array(trim($deliv_address['address1']), trim($deliv_address['address2'])))).', '.trim($deliv_address['postcode']).' '.$deliv_address['city'].', '.Country::getNameById(2, $deliv_address['id_country'])), ENT_COMPAT | ENT_HTML401, 'UTF-8'); echo ' $("#map_canvas").gmap("search", {"address": "'.$current_address.'"}, function(results, status) { - if ( status === "OK" ) { - var lat = null; - var lng = null; - if(results[0].geometry.location.H) { - lat = results[0].geometry.location.H; - lng = results[0].geometry.location.L; - } else if(results[0].geometry.location.G) { - lat = results[0].geometry.location.G; - lng = results[0].geometry.location.K; - } else { - var loc = results[0].geometry.location.toString().replace("(", "").replace(")", "").replace(" ", "").split(","); - lat = loc[0]; - lng = loc[1]; - } - $("#map_canvas").gmap("addMarker", {"icon": "http://static.privatesportshop.com/img/admin/marker_home.png", "idpr": "pr_home", "position": lat + "," + lng, "bounds": true}).click(function() { - $("#map_canvas").gmap("openInfoWindow", {"content": "Adresse actuelle"}, this); + if(results.length == 0) { + $("#map_canvas").gmap("search", {"address": "'.htmlentities(trim($deliv_address['postcode']).' '.$deliv_address['city'].', '.Country::getNameById(2, $deliv_address['id_country']), ENT_COMPAT | ENT_HTML401, 'UTF-8').'"}, function(results, status) { + displayMap(results, status, true); }); - '; - for($i= 0, $l = count($relay_points); $i < $l; $i++) { - $relay = $relay_points[$i]; - if($relay->Pays == "") { - continue; - } - echo ' - $("#map_canvas").gmap("search", {"address": "'.htmlentities(preg_replace('/(, ){2,}/', ', ', preg_replace('/(, ){2,}/', ', ', implode(', ', array(trim($relay->LgAdr3), trim($relay->LgAdr2), trim($relay->LgAdr4), trim($relay->CP).' '.trim($relay->Ville), Country::getNameById(2, $relay->Pays != 'FR'? Country::getByIso($relay->Pays): 8))))), ENT_COMPAT | ENT_HTML401, 'UTF-8').'"}, function(results, status) { - if ( status === "OK" ) { - var lat = null; - var lng = null; - if(results[0].geometry.location.H) { - lat = results[0].geometry.location.H; - lng = results[0].geometry.location.L; - } else if(results[0].geometry.location.G) { - lat = results[0].geometry.location.G; - lng = results[0].geometry.location.K; - } else { - var loc = results[0].geometry.location.toString().replace("(", "").replace(")", "").replace(" ", "").split(","); - lat = loc[0]; - lng = loc[1]; - } - var prtext = ["", "'.htmlentities(trim($relay->LgAdr1), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr2), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr3), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr4), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities($relay->CP, ENT_COMPAT | ENT_HTML401, 'UTF-8').' '.htmlentities($relay->Ville, ENT_COMPAT | ENT_HTML401, 'UTF-8').'"].filter(function(x) { return x != ""; }).join("
    "); - var prtext_action = "
    Sélectionner"; - markers.push($("#map_canvas").gmap("addMarker", { "id": "pr_'.htmlentities($relay->Num, ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "position": lat + "," +lng, "bounds": true, "content": prtext + prtext_action })); - markers[markers.length - 1].click(function() { - $("#map_canvas").gmap("openInfoWindow", {"content": $(this).attr("content")}, this); - }); - var litem = $("
  • ").attr("data-index", '.$i.').html(prtext).click(function() { - $.each(markers, function(id, el) { - if(el[0].id == "pr_'.htmlentities(trim($relay->Num), ENT_COMPAT | ENT_HTML401, 'UTF-8').'") { - google.maps.event.trigger(el[0], "click"); - } - }); - $("#map_canvas").gmap("option", "center", markers[parseInt($(this).attr("data-index"))][0].getPosition()); - updateForm("24R", "'.htmlentities(trim($relay->LgAdr1), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr2), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr3), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->LgAdr4), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->CP), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->Ville), ENT_COMPAT | ENT_HTML401, 'UTF-8').'", "'.htmlentities(trim($relay->Num), ENT_COMPAT | ENT_HTML401, 'UTF-8').'"); - }); - $("#pr_list ul").append(litem); - } - }); - '; - } - echo ' + } else { + displayMap(results, status); } }); }); diff --git a/modules/logistics/AdminLogistics.php b/modules/logistics/AdminLogistics.php index 5ddedf38..fa90efe2 100644 --- a/modules/logistics/AdminLogistics.php +++ b/modules/logistics/AdminLogistics.php @@ -274,50 +274,61 @@ class AdminLogistics extends AdminTab { $order = new Order((int) $id_order); if(Validate::isLoadedObject($order)) { $parcel_carrier == 'laposte'? $weight = 0.24: TRUE; - $result = $logistics_carriers[$parcel_carrier]->registerParcel($order, $products, $weight); - if($result[0] != '') { - $this->_html .= $result[0]; - return; - } - - $render = $logistics_carriers[$parcel_carrier]->renderLabel($order, $weight, $result[1]); - - if($render === 'pr_error') { - $this->_html .= '

    '.$this->l('Unknown delivery point').'


    '; - } elseif($render === 'route_error') { - $this->_html .= '

    '.$this->l('Route not found').'


    '; - } elseif($render !== FALSE) { - $this->printLabel($render); - - $this->_html .= '

    '.$this->l('Registration complete, label sent to printer').'


    '; - - if($_SERVER['REMOTE_ADDR'] != '109.190.53.175' - && $_SERVER['REMOTE_ADDR'] != '78.226.56.137' - && $_SERVER['REMOTE_ADDR'] != '88.163.22.223' - && $_SERVER['REMOTE_ADDR'] != '37.160.139.229' - && substr($_SERVER['REMOTE_ADDR'], 0, 2) != '37') { - - $products_names = array(); - foreach(Db::getInstance()->ExecuteS(' - SELECT `id_order_detail`, `product_name` - FROM `'._DB_PREFIX_.'order_detail` - WHERE `id_order_detail` IN ('.implode(', ', array_keys($products)).') - ') as $p) { - $products_names[(int) $p['id_order_detail']] = $p['product_name']; - } - - $logistics_carriers[$parcel_carrier]->logParcel($result[1], $products); - - foreach($products as $k => $v) { - if($v > 0) { - $products_sent .= '
    '."\r\n".$v.' x '.(isset($products_names[$k])? $products_names[$k]: '--'); - } - } - - $logistics_carriers[$parcel_carrier]->addOrderHistory($result[1], $order, $products_sent); + if($parcel_carrier == "laposte") { + $result = $logistics_carriers[$parcel_carrier]->registerParcel($order, $products, $weight); + if($result[0] != '') { + $this->_html .= $result[0]; + return; } - } else { - $this->html .= '

    '.$this->l('An error happened during the label rendering').'


    '; + + $render = $logistics_carriers[$parcel_carrier]->renderLabel($order, $weight, $result[1]); + + if($render === 'pr_error') { + $this->_html .= '

    '.$this->l('Unknown delivery point').'


    '; + } elseif($render === 'route_error') { + $this->_html .= '

    '.$this->l('Route not found').'


    '; + } elseif($render !== FALSE) { + $this->printLabel($render); + + $this->_html .= '

    '.$this->l('Registration complete, label sent to printer').'


    '; + + if($_SERVER['REMOTE_ADDR'] != '109.190.53.175' + && $_SERVER['REMOTE_ADDR'] != '78.226.56.137' + && $_SERVER['REMOTE_ADDR'] != '88.163.22.223' + && $_SERVER['REMOTE_ADDR'] != '37.160.139.229' + && substr($_SERVER['REMOTE_ADDR'], 0, 2) != '37') { + + $products_names = array(); + foreach(Db::getInstance()->ExecuteS(' + SELECT `id_order_detail`, `product_name` + FROM `'._DB_PREFIX_.'order_detail` + WHERE `id_order_detail` IN ('.implode(', ', array_keys($products)).') + ') as $p) { + $products_names[(int) $p['id_order_detail']] = $p['product_name']; + } + + $logistics_carriers[$parcel_carrier]->logParcel($result[1], $products); + + foreach($products as $k => $v) { + if($v > 0) { + $products_sent .= '
    '."\r\n".$v.' x '.(isset($products_names[$k])? $products_names[$k]: '--'); + } + } + + $logistics_carriers[$parcel_carrier]->addOrderHistory($result[1], $order, $products_sent); + } + } else { + $this->html .= '

    '.$this->l('An error happened during the label rendering').'


    '; + } + } elseif($parcel_carrier=='mondialrelay' + && ( + ($id_order_detail = Tools::getValue('id_order_detail_reprint')) + && ($weight = Tools::getValue('weight_reprint')) + ) + ){ + $result = $logistics_carriers['mondialrelay']->_getRegisteredParcel(new Order($id_order), $id_order_detail, $products, $weight); + $render = $logistics_carriers['mondialrelay']->renderLabel(new Order($id_order), $weight, $result[1]); + $this->printLabel($render,true); } } //$this->printLabel($logistics_carriers['laposte']->renderLabel(new Order((int) $id_order), $weight, $reprint_number)); @@ -330,10 +341,10 @@ class AdminLogistics extends AdminTab { $this->printLabel($logistics_carriers['exapaq']->renderLabel(new Order(23336), 0.24, array('shipping_number' => '100000000', 'exapass' => '250094100000000068'))); } elseif(Tools::isSubmit('submitTestMondialrelay')) { $this->_html .= '

    '.$this->l('Registration complete, label sent to printer').'


    '; - $weight = 0.12; - $id_order = 578808; - $id_order_detail = 1844105; - $product = array('5154233' => "1"); + $weight = 0.100000; + $id_order = 628811; + $id_order_detail = 1994641; + $product = array('5189355' => "1"); $result = $logistics_carriers['mondialrelay']->_getRegisteredParcel(new Order($id_order), $id_order_detail, $product, $weight); $render = $logistics_carriers['mondialrelay']->renderLabel(new Order($id_order), $weight, $result[1]); $f = fopen(dirname(__FILE__).'/label_mr.txt', 'a+'); @@ -803,7 +814,7 @@ class AdminLogistics extends AdminTab { '.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)? 'x': '').'\ '.(((int) $cookie->profile == 1 || (int) $cookie->profile == 9 || (int) $cookie->profile == 7 || (int) $cookie->profile == 14)? - '") + \'" data-ref="\' + loaded.logs[i].product_reference + \'" data-id_order="\' + loaded.order.id + \'" data-carrier="\' + loaded.logs[i].carrier + \'" data-id_order_detail="\' + loaded.logs[i].id_order_detail + \'">+': '').'\ + '") + \'" data-weight="\' + loaded.logs[i].weight + \'" data-ref="\' + loaded.logs[i].product_reference + \'" data-id_order="\' + loaded.order.id + \'" data-carrier="\' + loaded.logs[i].carrier + \'" data-id_order_detail="\' + loaded.logs[i].id_order_detail + \'">+': '').'\ \'; } @@ -818,6 +829,8 @@ class AdminLogistics extends AdminTab {

    \ \ \ + \ + \

    \ \ \ @@ -868,6 +881,8 @@ class AdminLogistics extends AdminTab { $("span#product-ref").text($(this).data("ref")); $("#carrier-reprint").val($(this).data("carrier")); $("#id_order-reprint").val($(this).data("id_order")); + $("#id_order_detail-reprint").val($(this).data("id_order_detail")); + $("#weight-reprint").val($(this).data("weight")); $("#quantity-reprint").attr("name","products_reprint["+$(this).data("id_order_detail")+"]"); /*$("#form-reprint-labels").hide();*/ diff --git a/modules/mondialrelay/es.php b/modules/mondialrelay/es.php index f6b98876..e8e974ee 100755 --- a/modules/mondialrelay/es.php +++ b/modules/mondialrelay/es.php @@ -36,6 +36,18 @@ $_MODULE['<{mondialrelay}prestashop>mondialrelay_8bf569ff65b32464e623ca9e9a10688 $_MODULE['<{mondialrelay}prestashop>mondialrelay_6ed26bdf3f9141ddca4ede91f943e567'] = 'El metodo del transportista no puede agregarse al modulo'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_af135815ccf731bcbffb522004762b57'] = 'EL transportista no puede borrarse todavia'; $_MODULE['<{mondialrelay}prestashop>mondialrelay_bba366864d25056c941b72f18ef79e7c'] = 'Este error no se conoce:'; +$_MODULE['<{mondialrelay}prestashop>selection_ea574723dfe9b3fe22cf852273eb54b2'] = 'Selección de los puntos de relevo'; +$_MODULE['<{mondialrelay}prestashop>selection_250705eeb4818b4a895bc9c148644db9'] = 'Hay un error :'; +$_MODULE['<{mondialrelay}prestashop>selection_96e0f3ab27038ff8ead88d3bb38fd2f9'] = 'Su punto de relevo ha sido registrada.'; +$_MODULE['<{mondialrelay}prestashop>selection_90d64eeba8247d656ef6b4800ec0f52f'] = 'sin IVA'; +$_MODULE['<{mondialrelay}prestashop>selection_f01390a0b796aab97beed915df1cdd63'] = 'IVA'; +$_MODULE['<{mondialrelay}prestashop>selection_b43150a5a761a760418604407b286237'] = 'Gratis!'; +$_MODULE['<{mondialrelay}prestashop>selection_bb8ecbd9a446c1868a8232c83a6a871f'] = 'Portador'; +$_MODULE['<{mondialrelay}prestashop>selection_a82be0f551b8708bc08eb33cd9ded0cf'] = 'información'; +$_MODULE['<{mondialrelay}prestashop>selection_bc138131629e312572f811a97f506f44'] = 'Precio'; +$_MODULE['<{mondialrelay}prestashop>selection_30f2be33218fc16bc6e11da40c43e773'] = 'Gratis!'; +$_MODULE['<{mondialrelay}prestashop>selection_7bb566167636b828774fe2be76976d34'] = 'elegir sus puntos de relevo'; +$_MODULE['<{mondialrelay}prestashop>selection_4525a58423124b28924e6751f6e1b088'] = 'Validar mi selección'; $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_a1c3470a944b9625cfb924fd15c8bdbf'] = 'Por favor, seleccione al menos un pedido'; $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_dc41aac14af17f1d19fca5e3b9439e74'] = 'La clave'; $_MODULE['<{mondialrelay}prestashop>mrcreatetickets_306b346c19017609403424203ea3d720'] = 'está vacío y debe ser llenado'; @@ -167,10 +179,24 @@ $_MODULE['<{mondialrelay}prestashop>settings_d02bbc3cb147c272b0445ac5ca7d1a36'] $_MODULE['<{mondialrelay}prestashop>settings_ca57625685f058f54d82c6e05876a131'] = 'Elige el estado para que las etiquetas.'; $_MODULE['<{mondialrelay}prestashop>settings_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar '; $_MODULE['<{mondialrelay}prestashop>settings_f4f70727dc34561dfde1a3c529b6205c'] = 'Ajustes'; -$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial Relay no puede buscar cualquier punto de repetición debido a un error prestashop'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_e0626222614bdee31951d84c64e5e9ff'] = 'Seleccionar'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_91b442d385b54e1418d81adc34871053'] = 'Seleccionado'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_ef2a1f426c2c289ed5986c7636a5d696'] = 'Por favor, elija un punto de relevo'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_80a0c205cd57b22fca7f174253870300'] = 'Horario de apertura'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_2b56b60f878922093facd42284848a0c'] = 'Más detalles'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_836f6c949a2f2d61489bf410def82111'] = 'Mondial Relay no puede buscar cualquier punto de relevo debido a un error prestashop'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_widget_ad3d06d03d94223fa652babc913de686'] = 'Validar'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_widget_b5cdf9b63fda35c33bb5e35cc3716b95'] = 'Lugar de recogida selecto:'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_widget_607fe9e462c0a459f540c94157016039'] = 'Cambiar selección'; +$_MODULE['<{mondialrelay}prestashop>checkout_process_widget_d807b6535a1b2ebfa0580f205a79f1cb'] = 'Debe seleccionar un punto de relevo para utilizar este método de entrega.'; $_MODULE['<{mondialrelay}prestashop>header_e0626222614bdee31951d84c64e5e9ff'] = 'Seleccionar'; -$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'seleccionado'; +$_MODULE['<{mondialrelay}prestashop>header_91b442d385b54e1418d81adc34871053'] = 'Seleccionado'; $_MODULE['<{mondialrelay}prestashop>header_ef2a1f426c2c289ed5986c7636a5d696'] = 'Por favor, elija un punto de relevo'; $_MODULE['<{mondialrelay}prestashop>header_80a0c205cd57b22fca7f174253870300'] = 'Horario de apertura'; $_MODULE['<{mondialrelay}prestashop>header_2b56b60f878922093facd42284848a0c'] = 'Más detalles'; +$_MODULE['<{mondialrelay}prestashop>header_widget_e0626222614bdee31951d84c64e5e9ff'] = 'Seleccionar'; +$_MODULE['<{mondialrelay}prestashop>header_widget_91b442d385b54e1418d81adc34871053'] = 'seleccionado'; +$_MODULE['<{mondialrelay}prestashop>header_widget_ef2a1f426c2c289ed5986c7636a5d696'] = 'Por favor, elija un punto de relevo'; +$_MODULE['<{mondialrelay}prestashop>header_widget_80a0c205cd57b22fca7f174253870300'] = 'Horario de apertura'; +$_MODULE['<{mondialrelay}prestashop>header_widget_2b56b60f878922093facd42284848a0c'] = 'Más detalles'; $_MODULE['<{mondialrelay}prestashop>order_detail_c2d05abc7f5ebdc72b6656df35038b43'] = 'Siga mi paquete en la página web Mondial Relay'; diff --git a/modules/philea_magistor/cron.php b/modules/philea_magistor/cron.php index e998277a..e472061c 100644 --- a/modules/philea_magistor/cron.php +++ b/modules/philea_magistor/cron.php @@ -1,7 +1,6 @@ getRow(' system('cd '.dirname(__FILE__).'/script && php send_article.php '.(int) $row['id_sale']); sleep(20); - // SEND REC01 - pas de gestion recption fournisseur sur bbb + // SEND REC01 Db::getInstance()->ExecuteS(' UPDATE `'._DB_PREFIX_.'philea_sync` SET `status` = 2 WHERE `id_sync` = '.(int) $row['id_sync'].' LIMIT 1 '); - /*system('cd '.dirname(__FILE__).'/script && php send_recep_orderform.php '.(int) $row['id_sale']);*/ + system('cd '.dirname(__FILE__).'/script && php send_recep_orderform.php '.(int) $row['id_sale']); } } diff --git a/modules/philea_magistor/cron_auto_sync.php b/modules/philea_magistor/cron_auto_sync.php index 626c2bfb..7bcbf76b 100644 --- a/modules/philea_magistor/cron_auto_sync.php +++ b/modules/philea_magistor/cron_auto_sync.php @@ -16,7 +16,7 @@ $auto_sync_sales = Db::getInstance()->executeS(' WHERE pms.`status` >= 2 AND pmas.active = 1 AND p.date_start <= NOW() - AND p.date_end >= DATE_SUB(NOW(), INTERVAL 1 HOUR) + AND p.date_end >= DATE_SUB(NOW(), INTERVAL 5 DAY) '); if ($auto_sync_sales && count($auto_sync_sales)) { diff --git a/modules/privatesales/Sale.php b/modules/privatesales/Sale.php index c1d45efb..d6e760fc 100755 --- a/modules/privatesales/Sale.php +++ b/modules/privatesales/Sale.php @@ -851,6 +851,7 @@ class Sale { if($carrier === "lp") { $carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_SOCOL'))); + $carriers[] = 22; // dropshipping } else { $carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_MR'))); } @@ -999,6 +1000,7 @@ class Sale { if($carrier === "lp") { $carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_SOCOL'))); + $carriers[] = 22; // dropshipping } else { $carriers = array_map('intval',explode(',', Configuration::get('ANT_CARRIERS_MR'))); }