From 91e4537e41fed842c73273b1ddc2cae5815edeba Mon Sep 17 00:00:00 2001 From: root Date: Wed, 13 Sep 2017 10:28:19 +0200 Subject: [PATCH] fix and trad from prod --- adm/mraddressedit.php | 127 ++-- js/mondialrelay_widget.js | 554 ++++++++++++++++++ .../carriers/mondialrelay/cron_trace.php | 54 +- themes/site_mobile/lang/es.php | 8 +- .../site_mobile/modules/categoryscroll/es.php | 20 + .../site_mobile/modules/categoryscroll/fr.php | 3 + 6 files changed, 677 insertions(+), 89 deletions(-) create mode 100644 js/mondialrelay_widget.js create mode 100644 themes/site_mobile/modules/categoryscroll/es.php diff --git a/adm/mraddressedit.php b/adm/mraddressedit.php index 760b3ab4..aa39ed9c 100644 --- a/adm/mraddressedit.php +++ b/adm/mraddressedit.php @@ -67,71 +67,23 @@ if($cookie->isLoggedBack() && $cart = Tools::getValue('id_cart')) { + + - - + + + + + - - - function updateForm(delivery_mode, address1, address2, address3, address4, postcode, city, prid) { - $("select[name=delivery_mode]").val(""); - $("input[name=MR_Selected_LgAdr1]").val(""); - $("input[name=MR_Selected_LgAdr2]").val(""); - $("input[name=MR_Selected_LgAdr3]").val(""); - $("input[name=MR_Selected_LgAdr4]").val(""); - $("input[name=MR_Selected_CP]").val(""); - $("input[name=MR_Selected_Ville]").val(""); - $("input[name=MR_Selected_Num]").val(""); - - $("select[name=delivery_mode]").val(delivery_mode); - $("input[name=MR_Selected_LgAdr1]").val(address1); - $("input[name=MR_Selected_LgAdr2]").val(address2); - $("input[name=MR_Selected_LgAdr3]").val(address3); - $("input[name=MR_Selected_LgAdr4]").val(address4); - $("input[name=MR_Selected_CP]").val(postcode); - $("input[name=MR_Selected_Ville]").val(city); - $("input[name=MR_Selected_Num]").val(prid); - } - - var enseigne = "F1BEBEBO"; - var isocode = "'.$address['MR_Selected_Pays'].'"; - var postcode = "'.$address['MR_Selected_CP'].'"; - var mode = "24R"; - var weight = '.(int)($weight * 1000).'; - if( weight == 0 ) weight = 100; - var t; - $(document).ready(function () { - $("#Zone_Widget").MR_ParcelShopPicker({ - UseSSL : true, - Weight: weight, - Target: "#Target_Widget", - TargetDisplay: "#TargetDisplay_Widget", - TargetDisplayInfoPR: "#TargetDisplayInfoPR_Widget", - Brand: enseigne, - Country: isocode, - PostCode: postcode, - ColLivMod: mode, - NbResults: "15", - DisplayMapInfo: true, - OnParcelShopSelected: function (data) { - updateForm("24R",data.Nom,"",data.Adresse1,data.Adresse2,data.CP,data.Ville,data.ID); - $("#cb_ID").html(data.ID); - $("#cb_Nom").html(data.Nom); - $("#cb_Adresse").html(data.Adresse1 + " " + data.Adresse2); - $("#cb_CP").html(data.CP); - $("#cb_Ville").html(data.Ville); - $("#cb_Pays").html(data.Pays); - } - }); - }); - '; - ?>
@@ -235,6 +187,63 @@ if($cookie->isLoggedBack() && $cart = Tools::getValue('id_cart')) { + + + function updateForm(delivery_mode, address1, address2, address3, address4, postcode, city, prid) { + $("select[name=delivery_mode]").val(""); + $("input[name=MR_Selected_LgAdr1]").val(""); + $("input[name=MR_Selected_LgAdr2]").val(""); + $("input[name=MR_Selected_LgAdr3]").val(""); + $("input[name=MR_Selected_LgAdr4]").val(""); + $("input[name=MR_Selected_CP]").val(""); + $("input[name=MR_Selected_Ville]").val(""); + $("input[name=MR_Selected_Num]").val(""); + + $("select[name=delivery_mode]").val(delivery_mode); + $("input[name=MR_Selected_LgAdr1]").val(address1); + $("input[name=MR_Selected_LgAdr2]").val(address2); + $("input[name=MR_Selected_LgAdr3]").val(address3); + $("input[name=MR_Selected_LgAdr4]").val(address4); + $("input[name=MR_Selected_CP]").val(postcode); + $("input[name=MR_Selected_Ville]").val(city); + $("input[name=MR_Selected_Num]").val(prid); + } + + var enseigne = "F1BEBEBO"; + var isocode = "'.$address['MR_Selected_Pays'].'"; + var postcode = "'.$address['MR_Selected_CP'].'"; + var mode = "24R"; + var weight = '.(int)($weight * 1000).'; + if( weight == 0 ) weight = 100; + var t; + $(document).ready(function () { + $("#Zone_Widget").MR_ParcelShopPicker({ + UseSSL : true, + Weight: weight, + Target: "#Target_Widget", + TargetDisplay: "#TargetDisplay_Widget", + TargetDisplayInfoPR: "#TargetDisplayInfoPR_Widget", + Brand: enseigne, + Country: isocode, + PostCode: postcode, + ColLivMod: mode, + NbResults: "15", + DisplayMapInfo: true, + OnParcelShopSelected: function (data) { + updateForm("24R",data.Nom,"",data.Adresse1,data.Adresse2,data.CP,data.Ville,data.ID); + $("#cb_ID").html(data.ID); + $("#cb_Nom").html(data.Nom); + $("#cb_Adresse").html(data.Adresse1 + " " + data.Adresse2); + $("#cb_CP").html(data.CP); + $("#cb_Ville").html(data.Ville); + $("#cb_Pays").html(data.Pays); + } + }); + }); + '; + ?> 0) { + for (var i = 0; i < paramArray.length; i += 2) { + paramList += paramArray[i] + '=' + paramArray[i + 1] + '&'; + } + } + + // ======================================= + // CORRECTION PROFILEO + // ======================================= + $.ajax({ + type: 'GET', + url: private.protocol + private.sw_url + '/' + fn + '?' + paramList + 'method=?', + dataType: 'json', + headers: { + 'Accept-Language': 'fr-fr' + }, + success: callbackFn + }); + }, + + loadhtml: function (container, urlraw, callback) { + var urlselector = (urlraw).split(" ", 1); + var url = urlselector[0]; + var selector = urlraw.substring(urlraw.indexOf(' ') + 1, urlraw.length); + private.container = container; + private.callback = callback; + private.jsonpcall(private.ashx, ['downloadurl', escape(url)], + function (msg) { + // gets the contents of the Html in the 'msg' + // todo: apply selector + private.container.html(msg); + if ($.isFunction(private.callback)) { + private.callback(); + } + }); + }, + + Manage_Response: function (result, container, Target, TargetDisplay, TargetDisplayInfoPR) { + if (result.Error == null) { + container.find(".MRW-Results").slideDown('slow'); + container.find(".MRW-RList").html(result.Value).show(); + if (private.params.ShowResultsOnMap) { + // Ajout des points sur la google map + //if (!private.mapLoaded) { + private.MR_LoadMap(private.params); + private.mapLoaded = true; + //} + + // Supprime le contenu de la carte + private.MR_clearOverlays(); + + // Boucle sur les Points Relais + for (var i = 0; i < result.PRList.length; i++) { + // Ajout d'un marker pour chaque Point Relais + + private.MR_AddGmapMarker( + private.map, + new google.maps.LatLng(result.PRList[i].Lat.replace(',', '.'), result.PRList[i].Long.replace(',', '.')), + result.PRList[i], + i, + private.sw_url, + Target, + TargetDisplay, + TargetDisplayInfoPR + ); + + } + + // Redimentionne la carte + private.map.fitBounds(private.bounds); + + // AutoSelect + if (private.params.AutoSelect) { + private.MR_FocusOnMaker(private.params.AutoSelect); + } + } else { + $('#MRW-Map', private.container).html(""); + for (var i = 0; i < result.PRList.length; i++) { + $('#MRW-Map', private.container).append(private.MR_BuildparcelShopDetails(result.PRList[i])) + + $.data($('#MRW-Map > div:last-child')[0], "ParcelShop", result.PRList[i]) + + + $('#MRW-Map > div:last-child').bind("select", function () { + + private.MR_SelectparcelShop($.data($(this)[0], "ParcelShop")); + }); + + + $('#MRW-Map > div', private.container).hide() + } + } + + + + } else { + container.find(".MRW-Results").hide(); + container.find(".MRW-Errors").html(result.Error).slideDown("slow"); + } + + container.find('.progressBar').hide(); + + // Gestion du hover sur les items + container.find('.PR-List-Item').mouseover(function () { + $(this).addClass("PR-hover"); + }); + container.find('.PR-List-Item').mouseout(function () { + $(this).removeClass("PR-hover"); + }); + + }, + MR_Widget_Call: function (container, Target, TargetDisplay, TargetDisplayInfoPR) { + container.find(".MRW-Errors").hide(); + container.find('.progressBar').show(); + container.find(".MRW-Errors").html(""); + + var a0 = container.find('input.Arg0')[0].value; + var a1 = container.find('input.Arg1')[0].value; + var a2 = container.find('input.Arg2')[0].value; + var a3 = container.find('input.Arg3')[0].value; + var a4 = container.find('input.Arg4')[0].value; + var a5 = container.find('input.Arg5')[0].value; + var a6 = container.find('input.Arg6')[0].value; + var a7 = container.find('input.Arg7')[0].value; + var a8 = private.params.VacationBefore || ''; + var a9 = private.params.VacationAfter || ''; + + private.jsonpcall(private.w_name + "/" + private.svc + "/SearchPR", + ["Brand", a0, "Country", a1, "PostCode", a2, "ColLivMod", a3, "Weight", a4, "NbResults", a5, "SearchDelay", a6, "SearchFar", a7, "ClientContainerId", private.containerId, "VacationBefore", a8, "VacationAfter", a9], + function (result) { + private.Manage_Response(result, container, Target, TargetDisplay, TargetDisplayInfoPR); + }); + }, + MR_LoadMap: function (prms) { + var myOptions = { + zoom: 5, + center: new google.maps.LatLng(46.80000, 1.69000), + mapTypeId: google.maps.MapTypeId.ROADMAP, + panControl: false, // Flèches de direction + rotateControl: true, + scaleControl: true, // Mesure de distance + scrollwheel: prms.MapScrollWheel ? prms.MapScrollWheel : false, // Zoom avec la molette de la souris + streetViewControl: prms.MapStreetView ? prms.MapStreetView : false, // Autorisation de StreetView + zoomControl: true // Zoom + }; + private.map = new google.maps.Map(document.getElementById('MRW-Map'), myOptions); + private.bounds = new google.maps.LatLngBounds(); + private.overlays = []; + private.infowindows = []; + }, + MR_clearOverlays: function () { + for (var n = 0, overlay; overlay = private.overlays[n]; n++) { + overlay.setMap(null); + } + // Clear overlays from collection + private.overlays = []; + private.infowindows = []; + private.bounds = new google.maps.LatLngBounds(); + }, + MR_FocusOnMaker: function (id) { + // Boucle sur les Markers + for (var i = 0; i < private.overlays.length; i++) { + // Test de validité + if (id == private.overlays[i].get("id")) { + private.MR_FocusOnMap(i); + } + } + }, + + MR_AddGmapMarker: function (map, latLng, PRI, Id, sw_url, Target, TargetDisplay, TargetDisplayInfoPR) { + // Get the letter for the marker + var letter = String.fromCharCode("A".charCodeAt(0) + (private.overlays.length)); + + // Create the marker + var marker = new google.maps.Marker({ + position: latLng, + map: map, + icon: new google.maps.MarkerImage(private.protocol + private.sw_url + "/" + private.w_name + "/css/imgs/gmaps_pr02" + letter + ".png") + }); + + // Add clickListener + google.maps.event.addListener(marker, 'click', function () { + // Fermeture de la fenêtre précédente + for(i in private.infowindows) + if(private.infowindows[i] != null) + private.infowindows[i].close(); + + private.InfoWindow = new google.maps.InfoWindow({ + content: private.MR_BuildparcelShopDetails(PRI) + }); + + private.InfoWindow.open(private.map, marker); + + private.infowindows.push(private.InfoWindow); + + private.map.setCenter(marker.getPosition()); + }); + + // Add clickListener + google.maps.event.addListener(marker, 'click', function () { + private.MR_SelectparcelShop(PRI); + }); + + // Add Marker to Overlays collection + private.overlays.push(marker); + + // Redimentionne la carte + private.bounds.extend(latLng); + //map.fitBounds(bounds); + + return marker; + }, + MR_SelectparcelShop: function (PRI) { + $(private.params.Target).val(PRI.Pays + '-' + PRI.ID).trigger('change'); + $(private.params.TargetDisplay).html(PRI.Pays + '-' + PRI.ID); + if (private.params.TargetDisplayInfoPR) { + $(private.params.TargetDisplayInfoPR).html(PRI.Nom + '
' + PRI.Adresse1 + '
' + PRI.Adresse2 + '
' + PRI.Pays + '-' + PRI.CP + ' ' + PRI.Ville + ' '); + } + + $(".PR-Selected").removeClass("PR-Selected"); + $('.PR-Id[Value="' + PRI.Pays + '-' + PRI.ID + '"]').parent().addClass("PR-Selected"); + + if (private.params.OnParcelShopSelected) { + private.params.OnParcelShopSelected(PRI) + } + }, + + MR_BuildparcelShopDetails: function (PRI) { + var content = '
' + + '
' + PRI.Nom + '
' + + '
' + + 'Info' + + 'Photo' + + '
' + + '
' + + '
' + PRI.HoursHtmlTable + '
' + + '
' + + '' + + '
' + + '
' + + '
' + return content; + }, + MR_loadjscssfile: function (filename, filetype) { + var fileref; + if (filetype == "js") { + fileref = document.createElement('script'); + fileref.setAttribute("type", "text/javascript"); + fileref.setAttribute("src", filename); + } + else if (filetype == "css") { + fileref = document.createElement("link"); + fileref.setAttribute("rel", "stylesheet"); + fileref.setAttribute("type", "text/css"); + fileref.setAttribute("href", filename); + } + if (typeof fileref != "undefined") { document.getElementsByTagName("head")[0].appendChild(fileref); } + }, + + MR_pad_left: function (s, c, n) { + if (!s || !c || s.length >= n) { + return s; + } + + var max = (n - s.length) / c.length; + for (var i = 0; i < max; i++) { + s = c + s; + } + + return s; + }, + + + // Initialisation du Widget après chargement du contrôle + MR_Widget_Init: function (container, prms) { + private.params = prms; + // Autocomplete sur le nom de ville + var t = container.find('input.iArg0'); + var autoCpl = $("
"); + autoCpl.addClass("PR-AutoCplCity"); + autoCpl.css("width", t.width()); + + container.find('.MRW-Search').append(autoCpl); + + container.find('input.Arg2').on('keydown', function (e) { + container.find('.PR-AutoCplCity').html("").slideUp("fast"); + }); + + container.find('input.iArg0').on('keydown', function (e) { + var keyCode = e.keyCode || e.which; + + var ia0 = container.find('input.iArg0')[0].value; + var a2 = ""; //container.find('input.Arg2')[0].value; + var a1 = container.find('input.Arg1')[0].value; + + var inp = String.fromCharCode(keyCode); + //déplacement par les touches + //en cas de touche fleche vers le bas + if (keyCode == 40) { + if (container.find('.PR-AutoCplCity .AutoCpl-Hover').length === 0) { + container.find('.PR-AutoCplCity div:first-child').addClass("AutoCpl-Hover"); + } else if (container.find('.AutoCpl-Hover').next().length > 0) { + container.find('.AutoCpl-Hover').removeClass("AutoCpl-Hover").next().addClass("AutoCpl-Hover"); + } + } + //en cas de touche fleche vers le haut + else if (keyCode == 38) { + if (container.find('.PR-AutoCplCity .AutoCpl-Hover').length === 0) { + container.find('.PR-AutoCplCity div:last-child').addClass("AutoCpl-Hover"); + } else if (container.find('.AutoCpl-Hover').prev().length > 0) { + container.find('.AutoCpl-Hover').removeClass("AutoCpl-Hover").prev().addClass("AutoCpl-Hover"); + } + } + //en cas de touche entrée + else if ((keyCode == 13 || keyCode == 9) && container.find('.AutoCpl-Hover').length > 0) { + e.preventDefault(); + container.find('input.Arg2')[0].value = container.find('.AutoCpl-Hover').attr("title"); + container.find('input.iArg0')[0].value = container.find('.AutoCpl-Hover').attr("name"); + container.find('.PR-AutoCplCity').html("").slideUp("fast"); + return; + } + //pour toute autre touche de type caractère + else if (/[a-zA-Z0-9\-_ ]/.test(inp)) { + ia0 = ia0 + inp; + if (ia0.length > 3) { + container.find('.PR-AutoCplCity').css("top", (this.offsetTop + 20) + "px"); + container.find('.PR-AutoCplCity').css("left", (this.offsetLeft) + "px"); + + private.jsonpcall(private.w_name + "/" + private.svc + "/AutoCPLCity", + ["PostCode", a2, "Country", a1, "City", ia0], + function (result) { + container.find('.PR-AutoCplCity').html(""); + + for (var i = 0; i < result.Value.length; i++) { + var elm = $("
"); + elm.attr("title", result.Value[i].PostCode); + elm.attr("name", result.Value[i].Name); + elm.addClass("PR-City"); + + elm.html(result.Value[i].Name + " (" + result.Value[i].PostCode + ")"); + container.find('.PR-AutoCplCity').append(elm); + elm.click(function () { + container.find('input.Arg2')[0].value = $(this).attr("title"); + container.find('input.iArg0')[0].value = $(this).attr("name"); + container.find('.PR-AutoCplCity').html("").slideUp("fast"); + }); + } + container.find('.PR-AutoCplCity').slideDown("fast"); + }); + + } + } + else { + container.find('.PR-AutoCplCity').html("").slideUp("fast"); + } + }); + + container.find('input.iArg0').blur(function (event) { + if (container.find('.AutoCpl-Hover').length) { + container.find('input.Arg2')[0].value = container.find('.AutoCpl-Hover').attr("title"); + container.find('input.iArg0')[0].value = container.find('.AutoCpl-Hover').attr("name"); + } + + }); + + // Fonction au click sur le bouton rechercher + container.find('.MRW-BtGo').click(function () { + var btn = $(this); + private.MR_Widget_Call(container, prms.Target, prms.TargetDisplay, prms.TargetDisplayInfoPR); + return false; + }); + + // Fonction au click sur la selection des pays + container.find('.MRW-flag').click(function () { + var btn = $(this); + container.find('.MRW-fl-Select').slideDown("fast").css("top", (this.offsetTop + this.height + 2) + "px").css("left", this.offsetLeft - 3 + "px"); + }); + + // Fonction au click sur la selection d'un pays + container.find('.MRW-fl-Item').click(function () { + var btn = $(this); + container.find('.MRW-fl-Select').slideUp("fast"); + container.find('.MRW-flag').attr('src', btn.find('img').attr('src')); + container.find('input.Arg1')[0].value = btn.find('img').attr('alt'); + }); + + container.find('input.Arg0')[0].value = prms.Brand; + container.find('input.Arg1')[0].value = prms.Country; + container.find('input.Arg2')[0].value = prms.PostCode; + container.find('input.Arg3')[0].value = prms.ColLivMod; + container.find('input.Arg4')[0].value = prms.Weight; + container.find('input.Arg5')[0].value = prms.NbResults; + container.find('input.Arg6')[0].value = prms.SearchDelay; + container.find('input.Arg7')[0].value = prms.SearchFar; + + if (prms.PostCode != "") { private.MR_Widget_Call(container, prms.Target, prms.TargetDisplay, prms.TargetDisplayInfoPR); } + } + }; + + var pub = { + MR_WidgetJq: function (Div, prms) { + var settings = $.extend({ + CSS: "1", // (Facultatif) Utilisation du CSS par défaut (1 = Oui) + Target: "", // (Obligatoire) L'ID du Point Relais sera retourné dans l'élément d'ID INPUT "RetourWidget" + TargetDisplay: "", // (Facultatif) L'ID du Point Relais sera retourné dans l'élément d'ID HTML "RetourDisplay" + Country: "FR", // (Obligatoire) Pays préselectionné + PostCode: "", // (Facultatif) Code Postal préselectionné + ColLivMod: "24R", // (Facultatif) Mode de collecte ou de livraison prévu + Weight: "", // (Facultatif) Poids du colis en Grammes + NbResults: "10", // (Facultatif) Nombre de résultat maximum affichable + SearchDelay: "", // (Facultatif) Délai prévu avant la remise du colis à Mondial Relay + AllowedCountries: "", // (Facultatif) Distance de recherche maximum + SearchFar: "", // (Facultatif) Distance de recherche maximum + MapScrollWheel: false, // (Facultatif) Maps : Activation de la molette de la souris pour effectuer un Zoom + MapStreetView: false, + ShowResultsOnMap: true, + UseSSL: ssl, + ServiceUrl: 'widget.mondialrelay.com', + OnParcelShopSelected: null + }, prms); + + if (settings.UseSSL) { + private.protocol = 'https://'; + settings.ServiceUrl= 'www.mondialrelay.fr/widget/'; + } else { + private.protocol = 'http://'; + } + + private.sw_url = settings.ServiceUrl; + + if (settings.AllowedCountries == "") { + settings.AllowedCountries = settings.Country; + } + + if (!Div.attr("id")) { Div.attr("id", "MRParcelShopPicker_" + Math.floor((Math.random() * 10000000) + 1)) } + + private.containerId = Div.attr("id") + + if (settings.CSS != "0") { + private.MR_loadjscssfile(private.protocol + private.sw_url + "/" + private.w_name + "/css/style.min.css", "css"); + } + private.container = Div; + private.loadhtml(private.container, private.protocol + private.sw_url + "/" + private.w_name + "/services/widget.v2.0.0.aspx?allowedCountries=" + settings.AllowedCountries + "&Country=" + settings.Country + "&UseSSL=" + settings.UseSSL, + function () { private.MR_Widget_Init(private.container, settings); }); + + return this; + }, + // load widget into 'container' from 'host' + MR_Widget: function (Div, prms) { + return pub.MR_WidgetJq($(Div), prms); + }, + MR_Destroy: function (Div, prms) { + private.container = $(Div); + private.container.find('input.Arg2').unbind('keydown'); + private.container.find('input.iArg0').unbind('keydown'); + private.mapLoaded = false; + }, + MR_FocusOnMap: function (i) { + if (private.params.ShowResultsOnMap) { + google.maps.event.trigger(private.overlays[i], "click"); + } else { + $('#MRW-Map > div', private.container).hide(); + $('#MRW-Map > div:nth-child(' + (i + 1) + ')', private.container).show().trigger('select'); + } + }, + MR_tabselect: function (tab) { + $(".Tabs-Btn-Selected", private.container).removeClass("Tabs-Btn-Selected"); + $('#btn_' + tab, private.container).addClass("Tabs-Btn-Selected"); + $(".Tabs-Tab-Selected", private.container).removeClass("Tabs-Tab-Selected"); + $('#tab_' + tab, private.container).addClass("Tabs-Tab-Selected"); + } + + }; + + return pub; +} (); + + +; (function ($, doc, win) { + "use strict"; + + var name = 'MondialRelay-ParcelShopPicker'; + + $.fn.MR_ParcelShopPicker = function (opts) { + + return this.each(function (i, el) { + var base = el; + base.init = function () { + base.MR = new Widgets.MR_Widget(el, opts); + $("#" + base.id).bind("FocusOnMap", function (evt, id) { + this.MR.MR_FocusOnMap(id) + }); + $("#" + base.id).bind("TabSelect", function (evt, id) { + this.MR.MR_tabselect(id) + }); + + }; + + + + base.init(); + + }); + }; +})(jQuery, document, window); + diff --git a/modules/logistics/carriers/mondialrelay/cron_trace.php b/modules/logistics/carriers/mondialrelay/cron_trace.php index acf2117b..ebb35844 100755 --- a/modules/logistics/carriers/mondialrelay/cron_trace.php +++ b/modules/logistics/carriers/mondialrelay/cron_trace.php @@ -200,36 +200,36 @@ foreach ($iterator as $fileinfo) { if(count($remaining) == 0) { $fully_sent = TRUE; } else { - $id_sales = array(); - foreach(Db::getInstance()->ExecuteS(' - SELECT DISTINCT c.`id_sale` - FROM `'._DB_PREFIX_.'product_ps_cache` c - LEFT JOIN `'._DB_PREFIX_.'order_detail` d - ON c.`id_product` = d.`product_id` - WHERE d.`id_order_detail` IN ('.implode(', ', $remaining).') - ') as $row) { - $id_sales[] = (int) $row['id_sale']; - } + // $id_sales = array(); + // foreach(Db::getInstance()->ExecuteS(' + // SELECT DISTINCT c.`id_sale` + // FROM `'._DB_PREFIX_.'product_ps_cache` c + // LEFT JOIN `'._DB_PREFIX_.'order_detail` d + // ON c.`id_product` = d.`product_id` + // WHERE d.`id_order_detail` IN ('.implode(', ', $remaining).') + // ') as $row) { + // $id_sales[] = (int) $row['id_sale']; + // } - $sent_sales = array(); - foreach(Db::getInstance()->ExecuteS(' - SELECT DISTINCT `id_sale` - FROM `'._DB_PREFIX_.'shipping_history` - WHERE `id_order` = '.(int) $order->id.' - AND `id_sale` IN ('.implode(', ', $id_sales).') - ') as $row) { - $sent_sales[] = (int) $row['id_sale']; - } + // $sent_sales = array(); + // foreach(Db::getInstance()->ExecuteS(' + // SELECT DISTINCT `id_sale` + // FROM `'._DB_PREFIX_.'shipping_history` + // WHERE `id_order` = '.(int) $order->id.' + // AND `id_sale` IN ('.implode(', ', $id_sales).') + // ') as $row) { + // $sent_sales[] = (int) $row['id_sale']; + // } - $remaining = array(); - foreach($id_sales as $s) { - if(!in_array($s, $sent_sales)) { - $remaining[] = (int) $s; - break; - } - } + // $remaining = array(); + // foreach($id_sales as $s) { + // if(empty($sent_sales) || !in_array($s, $sent_sales)) { + // $remaining[] = (int) $s; + // break; + // } + // } - $fully_sent = (count($remaining) == 0); + // $fully_sent = (count($remaining) == 0); } $html_products_sent = ''; diff --git a/themes/site_mobile/lang/es.php b/themes/site_mobile/lang/es.php index 135ce6cb..316ff2a4 100755 --- a/themes/site_mobile/lang/es.php +++ b/themes/site_mobile/lang/es.php @@ -462,6 +462,7 @@ $_LANG['order-payment_df33aeec3bf8aa7e8c63b2c4b04898c5'] = 'Por favor, elija el $_LANG['order-payment_1f87346a16cf80c372065de3c54c86d9'] = 'IVA incluído'; $_LANG['order-payment_8e1263b23607508e7ba8ff39aec8031d'] = 'Aún no se han instalado módulos de pago.'; $_LANG['order-payment_dd1f775e443ff3b9a89270713580a51b'] = 'Anterior'; +$_LANG['order-payment_23f53ead5550a12cb482453dd9e52d65'] = 'Validar mi pedido'; $_LANG['order-return_dfd57af0760925d5574fda1794d14de5'] = 'Devolución Nº'; $_LANG['order-return_ed2b5c0139cec8ad2873829dc1117d50'] = 'del'; $_LANG['order-return_88be9ea838e21273267409d76af3b284'] = 'Hemos aceptado su solicitud de devolución.'; @@ -736,10 +737,11 @@ $_LANG['live_edit_79030d996976f29a5e986a42d8f026e5'] = 'Imposible guardar la pos $_LANG['live_edit_3c5b87f318f203adbfcc5d6a68959359'] = 'Imposible cargar la lista de los módulos'; $_LANG['live_edit_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; $_LANG['live_edit_d8dcfab18b3a6eba56d617dd1dcb1ba7'] = 'Cerrar Live Edit'; -$_LANG['product_43c936b309c81e341da9c4e93acb2bb2'] = '¡Atención! X unidades en stock'; -$_LANG['product_62d6acaf1651581b3997c040ad383303'] = '¡Atención! 1 unidad en stock'; -$_LANG['product-list_62d6acaf1651581b3997c040ad383303'] = '¡Atención! 1 unidad en stock'; +$_LANG['product_43c936b309c81e341da9c4e93acb2bb2'] = '¡Atención! X artículos disponibles'; +$_LANG['product_62d6acaf1651581b3997c040ad383303'] = '¡Atención! 1 artículo disponible'; +$_LANG['product-list_62d6acaf1651581b3997c040ad383303'] = '¡Atención! 1 artículo disponible'; $_LANG['product-list_d4c56106032bdc1466602ea78e753210'] = '¡Atención!'; +$_LANG['product-list_e16d56df08bbd47e53e153fc6dfc8ad8'] = 'artículos disponibles'; $_LANG['product-list_b55197a49e8c4cd8c314bc2aa39d6feb'] = 'Agotado'; ?> \ No newline at end of file diff --git a/themes/site_mobile/modules/categoryscroll/es.php b/themes/site_mobile/modules/categoryscroll/es.php new file mode 100644 index 00000000..81f8b1d7 --- /dev/null +++ b/themes/site_mobile/modules/categoryscroll/es.php @@ -0,0 +1,20 @@ +product-list_f2d8873a73e15cc5accf7b99a1bc60e0'] = 'Bébé Boutik te propone este producto de forma aleatoria'; +$_MODULE['<{categoryscroll}site_mobile>product-list_03c2e7e41ffc181a4e84080b4710e81e'] = 'Nuevo'; +$_MODULE['<{categoryscroll}site_mobile>product-list_614391032716f509b5bb9e0c0b3ed305'] = 'en vez de'; +$_MODULE['<{categoryscroll}site_mobile>product-list_62d6acaf1651581b3997c040ad383303'] = '¡Atención! 1 artículo disponible'; +$_MODULE['<{categoryscroll}site_mobile>product-list_d4c56106032bdc1466602ea78e753210'] = '¡Atención!'; +$_MODULE['<{categoryscroll}site_mobile>product-list_e16d56df08bbd47e53e153fc6dfc8ad8'] = 'artículos disponibles'; +$_MODULE['<{categoryscroll}site_mobile>product-list_800e90e940e7f1fb938b0fda5137f38c'] = '¡En rebajas!'; +$_MODULE['<{categoryscroll}site_mobile>product-list_ca2bf12169883f4982d8fe34b7e3c618'] = '¡Precio rebajado!'; +$_MODULE['<{categoryscroll}site_mobile>product-list_d0fcb89c94b29d6ab2db749ff688dc7c'] = '¡Solo por Internet!'; +$_MODULE['<{categoryscroll}site_mobile>product-list_2d0f6b8300be19cf35e89e66f0677f95'] = 'Añadir a la cesta'; +$_MODULE['<{categoryscroll}site_mobile>product-list_b55197a49e8c4cd8c314bc2aa39d6feb'] = 'Agotado'; +$_MODULE['<{categoryscroll}site_mobile>product-list_78945de8de090e90045d299651a68a9b'] = 'Disponible'; +$_MODULE['<{categoryscroll}site_mobile>product-list_4351cfebe4b61d8aa5efa1d020710005'] = 'Ver'; +$_MODULE['<{categoryscroll}site_mobile>product-list_4391a5fd21c767037fbb3bcad0c1f595'] = 'Producto agotado'; +$_MODULE['<{categoryscroll}site_mobile>product-list_763ea78c330dfb4adafcaf118747de76'] = 'Comprar expreso'; +$_MODULE['<{categoryscroll}site_mobile>product-list_77798ad342555ffa834758a2aaa6fc11'] = 'Comparar'; \ No newline at end of file diff --git a/themes/site_mobile/modules/categoryscroll/fr.php b/themes/site_mobile/modules/categoryscroll/fr.php index 35a1bcb4..892580f0 100755 --- a/themes/site_mobile/modules/categoryscroll/fr.php +++ b/themes/site_mobile/modules/categoryscroll/fr.php @@ -7,3 +7,6 @@ $_MODULE['<{categoryscroll}site_mobile>header_aae0b71bf815d5f38c2878894282741c'] $_MODULE['<{categoryscroll}site_mobile>header_777f9e90cf251ec077f633406368c632'] = 'Requête invalide.'; $_MODULE['<{categoryscroll}site_mobile>header_70a224f6665359064a843c2ea65c0028'] = 'Cette catégorie est désactivée.'; $_MODULE['<{categoryscroll}site_mobile>product-list_b55197a49e8c4cd8c314bc2aa39d6feb'] = 'Stock épuisé'; +$_MODULE['<{categoryscroll}site_mobile>product-list_62d6acaf1651581b3997c040ad383303'] = 'Attention : 1 pièce en stock'; +$_MODULE['<{categoryscroll}site_mobile>product-list_d4c56106032bdc1466602ea78e753210'] = 'Attention : '; +$_MODULE['<{categoryscroll}site_mobile>product-list_e16d56df08bbd47e53e153fc6dfc8ad8'] = 'pièces en stock';