From 988b1f7d99cdb999b3bf77124cf9bc81cbc25d8a Mon Sep 17 00:00:00 2001 From: TheCoreDev Date: Wed, 12 Nov 2025 19:25:28 +0100 Subject: [PATCH] =?UTF-8?q?[12/11/2025]=20Apr=C3=A8s=20CapBretagne,=20corr?= =?UTF-8?q?ection=20du=20probl=C3=A8me=20de=20conflit=20Google=20Maps=20en?= =?UTF-8?q?tre=20ColissimoPickupPoint=20et=20MondialRelay?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/colissimo-pickup-point.html | 258 +++++---- .../mondialrelay/order-delivery-extra.html | 543 +++++++++--------- .../frontOffice/lematelot/order-delivery.html | 9 + 3 files changed, 435 insertions(+), 375 deletions(-) diff --git a/local/modules/ColissimoPickupPoint/templates/frontOffice/default/colissimo-pickup-point.html b/local/modules/ColissimoPickupPoint/templates/frontOffice/default/colissimo-pickup-point.html index e70228f0..163beda3 100644 --- a/local/modules/ColissimoPickupPoint/templates/frontOffice/default/colissimo-pickup-point.html +++ b/local/modules/ColissimoPickupPoint/templates/frontOffice/default/colissimo-pickup-point.html @@ -4,13 +4,13 @@
- {* Point relais *} - {* Check if Colissimo webservice is up *} - {assign var="isColissimoPickupPointUp" value=0} - {colissimoPickupPointDeliveryPrice country=$country}

{$isValidMode}

- {if $isValidMode !== false} - {loop name="is.colissimo.pickup.point.up" type="colissimo.pickup.point.around"}{/loop} - {ifloop rel="is.colissimo.pickup.point.up"} + {* Point relais *} + {* Check if Colissimo webservice is up *} + {assign var="isColissimoPickupPointUp" value=0} + {colissimoPickupPointDeliveryPrice country=$country}

{$isValidMode}

+ {if $isValidMode !== false} + {loop name="is.colissimo.pickup.point.up" type="colissimo.pickup.point.around"}{/loop} + {ifloop rel="is.colissimo.pickup.point.up"}
{intl l="Near you" d='colissimopickuppoint.fo.default'} / {$deliveryPrice} {currency attr="symbol"} @@ -40,9 +40,9 @@ function updatemap_colissimo_pickup_point(adr_geoloc, locations) { var buf = "", - marker, - loc, - i; + marker, + loc, + i; // save current search if (adr_geoloc !== undefined && locations !== undefined) { @@ -54,7 +54,8 @@ // Define MAP var mapOptions = { zoom: 13, - mapTypeId: google.maps.MapTypeId.ROADMAP + mapTypeId: google.maps.MapTypeId.ROADMAP, + mapId: "COLISSIMO_MAP_ID" } // On va créer la map dans la div qui a l'id relaymap mapSOC.map = new google.maps.Map(document.getElementById('colissimopickuppointmap'), mapOptions); @@ -71,11 +72,12 @@ if (status == google.maps.GeocoderStatus.OK) { // Et on centre la map sur cette position mapSOC.map.setCenter(results[0].geometry.location); - marker = new google.maps.Marker({ + marker = new google.maps.marker.AdvancedMarkerElement({ position: new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()), - map: mapSOC.map, - icon: "{image file='assets/img/maison.png' source='ColissimoPickupPoint'}" + map: mapSOC.map/*, + icon: "{image file='assets/img/maison.png' source='ColissimoPickupPoint'}"*/ }); + if (mapSOC.position != null){ mapSOC.position.setMap(null); } @@ -124,31 +126,32 @@ } buf += '' + - '' + - '' + - '' + loc.name + ' ' + - '
' + - loc.address + - '
' + - loc.zipcode + ' ' + loc.city + - ' - ' + loc.distance; + '' + + '' + + '' + loc.name + ' ' + + '
' + + loc.address + + '
' + + loc.zipcode + ' ' + loc.city + + ' - ' + loc.distance; if (loc.disabledPerson == "1"){ buf += ' '; } buf += '' + - '' + - '
' + - '' + - '
' + - '' + - ''; + '' + + '
' + + '' + + '
' + + '' + + ''; - marker = new google.maps.Marker({ + marker = new google.maps.marker.AdvancedMarkerElement({ position: new google.maps.LatLng(loc.lat, loc.lng), - map: mapSOC.map, + map: mapSOC.map/*, icon: mapSOC.images[loc.type] + */ }); mapSOC.listMarker.push(marker); @@ -162,28 +165,28 @@ $("#colissimo-pickup-point" + data.id).prop('checked', true); //verifyRadio(); mapSOC.infowindow.setContent( - '' + - '' + data.name + '' + - '
' + - data.address + - '
' + - data.zipcode + - ' ' + - data.city + - '
' + - '

' + data.distance + - ' ' + - ((data.disabledPerson) ? '' : "") + - '

' + - '' + - getHoraireRow('{intl l="Monday" d='colissimopickuppoint.fo.default'}', data.monday) + - getHoraireRow('{intl l="Tuesday" d='colissimopickuppoint.fo.default'}', data.tuesday) + - getHoraireRow('{intl l="Wednesday" d='colissimopickuppoint.fo.default'}', data.wednesday) + - getHoraireRow('{intl l="Friday" d='colissimopickuppoint.fo.default'}', data.friday) + - getHoraireRow('{intl l="Thursday" d='colissimopickuppoint.fo.default'}', data.thursday) + - getHoraireRow('{intl l="Saturday" d='colissimopickuppoint.fo.default'}', data.saturday) + - getHoraireRow('{intl l="Sunday" d='colissimopickuppoint.fo.default'}', data.sunday) + - '
'); + '' + + '' + data.name + '' + + '
' + + data.address + + '
' + + data.zipcode + + ' ' + + data.city + + '
' + + '

' + data.distance + + ' ' + + ((data.disabledPerson) ? '' : "") + + '

' + + '' + + getHoraireRow('{intl l="Monday" d='colissimopickuppoint.fo.default'}', data.monday) + + getHoraireRow('{intl l="Tuesday" d='colissimopickuppoint.fo.default'}', data.tuesday) + + getHoraireRow('{intl l="Wednesday" d='colissimopickuppoint.fo.default'}', data.wednesday) + + getHoraireRow('{intl l="Friday" d='colissimopickuppoint.fo.default'}', data.friday) + + getHoraireRow('{intl l="Thursday" d='colissimopickuppoint.fo.default'}', data.thursday) + + getHoraireRow('{intl l="Saturday" d='colissimopickuppoint.fo.default'}', data.saturday) + + getHoraireRow('{intl l="Sunday" d='colissimopickuppoint.fo.default'}', data.sunday) + + '
'); mapSOC.infowindow.open(mapSOC.map, marker); }); } @@ -200,8 +203,8 @@ function initialize_so() { // Get the selected customer address var $selectedAddressInput = $('#form-cart-delivery') - .find('[name="thelia_order_delivery[delivery-address]"]') - .filter(':checked'); + .find('[name="thelia_order_delivery[delivery-address]"]') + .filter(':checked'); var selectedAddressId = $selectedAddressInput.val(); @@ -209,53 +212,53 @@ var addresses_geoloc = []; {loop type="address" name="delivery-selection-colissimo-pickup-point" customer="current"} - addresses_geoloc[{$ID}] = "{$ADDRESS1}, {$ZIPCODE} {$CITY}"; + addresses_geoloc[{$ID}] = "{$ADDRESS1}, {$ZIPCODE} {$CITY}"; {/loop} - var adr_geoloc = addresses_geoloc[selectedAddressId]; + var adr_geoloc = addresses_geoloc[selectedAddressId]; - // Get every relay around customer's address - var locations = []; - $.get( - locationsSearchUrl + "?address=" + selectedAddressId, - function(data) { - locations = data.locations; - updatemap_colissimo_pickup_point(adr_geoloc, locations); - } - ); - } - var normalize = (function () { - var a = ['À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', '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'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o']; + // Get every relay around customer's address + var locations = []; + $.get( + locationsSearchUrl + "?address=" + selectedAddressId, + function(data) { + locations = data.locations; + updatemap_colissimo_pickup_point(adr_geoloc, locations); + } + ); + } + var normalize = (function () { + var a = ['À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', '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'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o']; - return function (str) { - var i = a.length; - while (i--) str = str.replace(a[i], b[i]); - return str; - }; - }()); + return function (str) { + var i = a.length; + while (i--) str = str.replace(a[i], b[i]); + return str; + }; + }()); - function search_city_colissimo_pickup_point() { - var address = document.getElementById("search-address-colissimo-pickup-point").value; - var zipcode = document.getElementById("search-zipcode-colissimo-pickup-point").value; - var city = document.getElementById("search-city-colissimo-pickup-point").value; - var countryid = $("#search-countryid-colissimo-pickup-point").val(); - if (zipcode == "" || city == "") { - alert("{intl l="Please enter a city and a zipcode" d='colissimopickuppoint.fo.default'}"); - } else { - // Get site base url - var url_site = '{url path="/"}module/ColissimoPickupPoint/' + function search_city_colissimo_pickup_point() { + var address = document.getElementById("search-address-colissimo-pickup-point").value; + var zipcode = document.getElementById("search-zipcode-colissimo-pickup-point").value; + var city = document.getElementById("search-city-colissimo-pickup-point").value; + var countryid = $("#search-countryid-colissimo-pickup-point").val(); + if (zipcode == "" || city == "") { + alert("{intl l="Please enter a city and a zipcode" d='colissimopickuppoint.fo.default'}"); + } else { + // Get site base url + var url_site = '{url path="/"}module/ColissimoPickupPoint/' + encodeURIComponent(countryid) + '/' + encodeURIComponent(zipcode) + '/' + encodeURIComponent(normalize(city)); - if (address != ""){ - url_site += '/' + encodeURIComponent(normalize(address)); - } - // Get search address - var adr_geoloc = address + " " + zipcode + " " + city; - // Get every relay around customer's address - var locations = []; - $.getJSON(url_site) + if (address != ""){ + url_site += '/' + encodeURIComponent(normalize(address)); + } + // Get search address + var adr_geoloc = address + " " + zipcode + " " + city; + // Get every relay around customer's address + var locations = []; + $.getJSON(url_site) .done(function(data) { if (!$.isEmptyObject(data)) { locations = data.locations; @@ -267,8 +270,8 @@ .fail(function( jqxhr, textStatus, error ) { var err = textStatus + ", " + error; }); + } } - } @@ -315,7 +318,7 @@
{images file="assets/img/CIT.png" source="ColissimoPickupPoint"} - + {/images}
{intl l="Automatic pickup point" d='colissimopickuppoint.fo.default'}

{intl l="Delivery in France in one of the 500 automatic instructions 7/7 and 24h/24." d='colissimopickuppoint.fo.default'}

@@ -374,15 +377,15 @@
@@ -397,35 +400,64 @@
- -
-
- {/ifloop} - {/if} + {/ifloop} + {/if} diff --git a/templates/frontOffice/lematelot/order-delivery.html b/templates/frontOffice/lematelot/order-delivery.html index bb12f6ea..dbe0bc24 100644 --- a/templates/frontOffice/lematelot/order-delivery.html +++ b/templates/frontOffice/lematelot/order-delivery.html @@ -151,6 +151,15 @@ {block name="javascript-initialization"} + +