Commit du module Colissimo

This commit is contained in:
2020-09-09 12:52:39 +02:00
parent de4bc540e4
commit b5d5fd110e
123 changed files with 28431 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#socolissimomap .table tbody > tr > th, #socolissimomap .table tbody > tr > td {
padding: 10px 10px 0;
}
.title-socolissimo-pickup-type{
color: #E47A10;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,29 @@
{assign var="addresslooptype" value="address"}
{loop type="socolissimoid" name="socolissimoid.invoice"}
{if $module == {order attr="delivery_module"}}
{assign var="addresslooptype" value="address.socolissimo"}
{/if}
{/loop}
{loop type=$addresslooptype name="delivery-address" id={order attr="delivery_address"}}
<div class="panel">
<div class="panel-heading">{intl l="Delivery address"}</div>
<div class="panel-body">
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
<span class="org">{$COMPANY}</span>
<address class="adr">
<span class="street-address">{$ADDRESS1}</span><br>
{if $ADDRESS2 != ""}
<span class="street-address">{$ADDRESS2}</span><br>
{/if}
{if $ADDRESS3 != ""}
<span class="street-address">{$ADDRESS3}</span><br>
{/if}
<span class="postal-code">{$ZIPCODE}</span>
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span><br>
<span class="cellphone">{$CELLPHONE}</span>
</address>
</div>
</div>
{/loop}

View File

@@ -0,0 +1,509 @@
{loop type="delivery" name="socolissimo" id=$module force_return="true" country=$country}
<tr style="display: none;">
<td colspan="3">
<div id="point-socolissimo">
<div id="google-map-socolissimo">
{* Domicile *}
{socolissimoDeliveryPrice delivery-mode="dom" country=$country}
{if $isValidMode !== false}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="home delivery" d='socolissimo.fo.default'}</strong> / {$deliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<div class="container-fluid">
<div style="padding-top: 15px;">
{images file="assets/img/socolissimo/dom-small.png" source="SoColissimo"}
<img src="{$asset_url}" alt="{intl l="My home" d='socolissimo.fo.default'}">
{/images}
<br>
{intl l="Delivery to you or a personal address of your choice." d='socolissimo.fo.default'}
<div class="clearfix">
<button type="submit" name="socolissimo-home" value="DOM" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d="socolissimo.fo.default"}</button>
</div>
</div>
</div>
</div>
</div>
{/if}
{* Point relais *}
{* Check if soColissimo webservice is up *}
{assign var="isSocolissimoUp" value=0}
{socolissimoDeliveryPrice delivery-mode="pr" country=$country}<h1>{$isValidMode}</h1>
{if $isValidMode !== false}
{loop name="is.socolissimo.up" type="socolissimo.around"}{/loop}
{ifloop rel="is.socolissimo.up"}
<div class="panel panel-default">
<div class="panel-heading">
<strong>{intl l="Near you" d='socolissimo.fo.default'}</strong> / {$deliveryModePrice} {currency attr="symbol"}
</div>
<div class="panel-body">
<script>
var mapSOC = {
"map": null,
"infowindow": null,
"geocoder": null,
"listMarker": [],
"position": null,
"images": {
'BPR': '{image file="assets/img/socolissimo/BPR.png" source="SoColissimo"}',
'ACP': '{image file="assets/img/socolissimo/BPR.png" source="SoColissimo"}',
'CDI': '{image file="assets/img/socolissimo/BPR.png" source="SoColissimo"}',
'BDP': '{image file="assets/img/socolissimo/BPR.png" source="SoColissimo"}',
'A2P': '{image file="assets/img/socolissimo/A2P.png" source="SoColissimo"}',
'CMT': '{image file="assets/img/socolissimo/A2P.png" source="SoColissimo"}',
'PCS': '{image file="assets/img/socolissimo/CIT.png" source="SoColissimo"}',
'HANDICAPE': '{image file="assets/img/socolissimo/mobilite-reduite.gif" source="SoColissimo"}'
},
"address": "",
"locations": []
};
function updatemap_socolissimo(adr_geoloc, locations) {
var buf = "",
marker,
loc,
i;
// save current search
if (adr_geoloc !== undefined && locations !== undefined) {
mapSOC.address = adr_geoloc;
mapSOC.locations = locations;
}
if (mapSOC.map === null) {
// Define MAP
var mapOptions = {
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
// On va créer la map dans la div qui a l'id relaymap
mapSOC.map = new google.maps.Map(document.getElementById('socolissimomap'), mapOptions);
mapSOC.infowindow = new google.maps.InfoWindow({
size: new google.maps.Size(50,50)
});
mapSOC.geocoder = new google.maps.Geocoder();
}
// We get latitude and longitude for the customer's adress
var b = [];
b['address'] = mapSOC.address;
mapSOC.geocoder.geocode(b, function (results, status) {
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({
position: new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()),
map: mapSOC.map,
icon: "{image file='assets/img/socolissimo/maison.png' source='SoColissimo'}"
});
if (mapSOC.position != null){
mapSOC.position.setMap(null);
}
mapSOC.position = marker;
} else {
// Sinon on met le centre de la map sur Clermont-Ferrand ;)
alert("{intl l="Actual address can't be geolocated"}");
var myLatLng = new google.maps.LatLng(45.7789, 3.0782);
mapSOC.map.setCenter(myLatLng);
mapSOC.map.setZoom(3);
}
});
// clean current map
$("#table-socolissimo").html("");
for (i = 0; i < mapSOC.listMarker.length; i++) {
//google.maps.event.removeListener(listMarker[i]);
mapSOC.listMarker[i].setMap(null);
}
mapSOC.listMarker = [];
var servicesCode = {
'POSTE' : ['BPR', 'ACP', 'CDI', 'BDP'],
'RELAIS' : ['A2P', 'CMT'],
'CONSIGNE' : ['PCS']
};
// Get services (or relay point type) that user wants to include in his search
var services = {};
$("input.toggle-type-socolissimo:checked").each(function(){
if(servicesCode.hasOwnProperty(this.value)){
var codeArray = servicesCode[this.value];
codeArray.forEach(function (code) {
services[code] = true;
});
}
});
// Pour chaque point relais dans locations on crée un nouveau marker
// And Complete table-relais
for (i = 0; i < mapSOC.locations.length; i++) {
loc = mapSOC.locations[i];
if (! services[loc.type]){
continue;
}
buf += '<tr>' +
'<td>' +
'<img src="' + mapSOC.images[loc.type] + '">' +
'<strong>' + loc.name + '</strong> ' +
'<br>' +
loc.address +
'<br>' +
loc.zipcode + ' ' + loc.city +
' - ' + loc.distance;
if (loc.disabledPerson == "1"){
buf += ' <img src="' + mapSOC.images["HANDICAPE"] + '">';
}
buf += '</td>' +
'<td>' +
'<div class="radio">' +
'<input type="radio" name="socolissimo_code" data-marker=' + i + ' class="socolissimo_pr" id="pr-socolissimo' + loc.id + '" value="' + loc.id + ':'+ loc.type + ':'+ loc.countrycode + '">' +
'</div>' +
'</td>' +
'</tr>';
marker = new google.maps.Marker({
position: new google.maps.LatLng(loc.lat, loc.lng),
map: mapSOC.map,
icon: mapSOC.images[loc.type]
});
mapSOC.listMarker.push(marker);
attachMarker(marker, loc);
}
document.getElementById("table-socolissimo").innerHTML = buf;
}
function attachMarker(marker, data) {
google.maps.event.addListener(marker, 'click', function() {
$("#pr-socolissimo" + data.id).prop('checked', true);
//verifyRadio();
mapSOC.infowindow.setContent(
'<img src="' + mapSOC.images[data.type] + '">' +
'<strong>' + data.name + '</strong>' +
'<address style="margin: 0">' +
data.address +
'<br>' +
data.zipcode +
' ' +
data.city +
'</address>' +
'<p>' + data.distance +
' ' +
((data.disabledPerson) ? '<img src="' + mapSOC.images["HANDICAPE"] + '">' : "") +
'</p>' +
'<table class="table table-condensed table-striped table-bordered" style="width: 100%;">' +
getHoraireRow('{intl l="Monday" d='socolissimo.fo.default'}', data.monday) +
getHoraireRow('{intl l="Tuesday" d='socolissimo.fo.default'}', data.tuesday) +
getHoraireRow('{intl l="Wednesday" d='socolissimo.fo.default'}', data.wednesday) +
getHoraireRow('{intl l="Friday" d='socolissimo.fo.default'}', data.friday) +
getHoraireRow('{intl l="Thursday" d='socolissimo.fo.default'}', data.thursday) +
getHoraireRow('{intl l="Saturday" d='socolissimo.fo.default'}', data.saturday) +
getHoraireRow('{intl l="Sunday" d='socolissimo.fo.default'}', data.sunday) +
'</table>');
mapSOC.infowindow.open(mapSOC.map, marker);
});
}
function getHoraireRow(lib, data){
var newData = data.replace("00:00-00:00", "", "g").replace(" ", "", "g");
var ret = "";
if (newData != ""){
ret = '<tr><th>' + lib + ' </th><td> ' + newData + '</td></tr>';
}
return ret;
}
function initialize_so() {
// Get the selected customer address
var $selectedAddressInput = $('#form-cart-delivery')
.find('[name="thelia_order_delivery[delivery-address]"]')
.filter(':checked');
var selectedAddressId = $selectedAddressInput.val();
var locationsSearchUrl = "{url path='/module/socolissimo/points'}";
var addresses_geoloc = [];
{loop type="address" name="delivery-selection-socolissimo" customer="current"}
addresses_geoloc[{$ID}] = "{$ADDRESS1}, {$ZIPCODE} {$CITY}";
{/loop}
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_socolissimo(adr_geoloc, locations);
}
);
}
var normalize = (function () {
var a = ['À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ'];
var b = ['A', 'A', 'A', 'A', 'A', 'A', 'AE', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'D', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', '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;
};
}());
function search_city_socolissimo() {
var address = document.getElementById("search-address-socolissimo").value;
var zipcode = document.getElementById("search-zipcode-socolissimo").value;
var city = document.getElementById("search-city-socolissimo").value;
var countryid = $("#search-countryid-socolissimo").val();
if (zipcode == "" || city == "") {
alert("{intl l="Please enter a city and a zipcode" d='socolissimo.fo.default'}");
} else {
// Get site base url
var url_site = '{url path="/"}module/socolissimo/'
+ 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)
.done(function(data) {
if (!$.isEmptyObject(data)) {
locations = data.locations;
updatemap_socolissimo(adr_geoloc, locations);
} else {
alert("{intl l='Colissimo is unavailable. Please choose another delivery method' d='socolissimo.fo.default'}");
}
})
.fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
});
}
}
</script>
<div class="container-fluid">
<div class="row">
<!-- Bureau de poste -->
<div class="col-md-4 col-sm-4">
<div style="padding-top: 5px; padding-bottom: 5px;">
{images file="assets/img/socolissimo/BPR.png" source="SoColissimo"}
<img src="{$asset_url}" class="pull-left">
{/images}
<h5 class="title-socolissimo-pickup-type">{intl l="Post office" d='socolissimo.fo.default'}</h5>
<p>{intl l="Delivery in one of the 10,000 collection points La Poste in France or in a post office in Europe." d='socolissimo.fo.default'}</p>
<div class="checkbox">
<label class="control-label" for="toggle-type-socolissimo-4">
<input type="checkbox" name="toggle-type-socolissimo" id="toggle-type-socolissimo-4" class="toggle-type-socolissimo" value="POSTE" checked>
{intl l="include in results" d='socolissimo.fo.default'}
</label>
</div>
</div>
</div><!-- // Bureau de poste -->
<!-- Relais Pickup -->
<div class="col-md-4 col-sm-4">
<div style="padding-top: 5px; padding-bottom: 5px;">
{images file="assets/img/socolissimo/A2P.png" source="SoColissimo"}
<img src="{$asset_url}" class="pull-left">
{/images}
<h5 class="title-socolissimo-pickup-type">{intl l="Pickup shop" d='socolissimo.fo.default'}</h5>
<p>{intl l="Delivery in one of the 7,500 shops in the PICKUP network." d='socolissimo.fo.default'}</p>
<div class="checkbox">
<label class="control-label" for="toggle-type-socolissimo-5">
<input type="checkbox" name="toggle-type-socolissimo" id="toggle-type-socolissimo-5" class="toggle-type-socolissimo" value="RELAIS" checked>
{intl l="include in results" d='socolissimo.fo.default'}
</label>
</div>
</div>
</div><!-- // Relais Pickup -->
<!-- Consigne Pickup Station -->
<div class="col-md-4 col-sm-4">
<div style="padding-top: 5px; padding-bottom: 5px;">
{images file="assets/img/socolissimo/CIT.png" source="SoColissimo"}
<img src="{$asset_url}" class="pull-left">
{/images}
<h5 class="title-socolissimo-pickup-type">{intl l="Automatic pickup point" d='socolissimo.fo.default'}</h5>
<p>{intl l="Delivery in France in one of the 500 automatic instructions 7/7 and 24h/24." d='socolissimo.fo.default'}</p>
<div class="checkbox">
<label class="control-label" for="toggle-type-socolissimo-6">
<input type="checkbox" name="toggle-type-socolissimo" id="toggle-type-socolissimo-6" class="toggle-type-socolissimo" value="CONSIGNE" checked>
{intl l="include in results" d='socolissimo.fo.default'}
</label>
</div>
</div>
</div><!-- // Consigne Pickup Station -->
</div>
</div>
<div class="row">
<div class="container-fluid">
<!-- Map -->
<div class="col-md-7" style="padding-right: 0;">
<div id="socolissimomap" style="width: 100%; height: 450px;"></div>
</div><!-- // Map -->
<!-- Liste -->
<div class="col-md-5" style="padding-left: 0">
<div style="height: 450px; overflow-y: scroll;">
<table class="table table-bordered table-striped" id="table-socolissimo"></table>
</div>
</div><!-- // Liste -->
</div>
<div class="container-fluid">
<div class="col-md-12">
<h4>{intl l="Search Colissimo relay in a city" d='socolissimo.fo.default'}</h4>
<div class="row">
<div class="col-md-3">
<label for="search-address-socolissimo" class="control-label sr-only">
{intl l="address" d='socolissimo.fo.default'}
</label>
<input type="text" id="search-address-socolissimo" placeholder="{intl l='address' d='socolissimo.fo.default'}" class="form-control" style="" onPaste=""
{literal}onkeydown="if (event.keyCode == 13) {return false;}"{/literal}/>
</div>
<div class="col-md-2">
<label for="search-zipcode-socolissimo" class="control-label sr-only">
{intl l="zipcode" d='socolissimo.fo.default'}
</label>
<input type="text" id="search-zipcode-socolissimo" placeholder="{intl l='zipcode' d='socolissimo.fo.default'}" class="form-control" style="" onPaste=""
{literal}onkeydown="if (event.keyCode == 13) {search_city_socolissimo();return false;}"{/literal}/>
</div>
<div class="col-md-3">
<label for="search-city-socolissimo" class="control-label sr-only">
{intl l="city" d='socolissimo.fo.default'}
</label>
<input type="text" id="search-city-socolissimo" placeholder="{intl l='city' d='socolissimo.fo.default'}" class="form-control" style="" onPaste=""
{literal}onkeydown="if (event.keyCode == 13) {search_city_socolissimo();return false;}"{/literal}/>
</div>
<div class="col-md-2">
<select id="search-countryid-socolissimo" class="form-control">
{loop type="country" name="country.list"}
<option value="{$ID}"
{if $value != ""}
{if $value == $ID}selected{/if}
{else}
{if $IS_DEFAULT}selected{/if}
{/if}
>{$TITLE}</option>
{/loop}
</select>
</div>
<div class="col-md-2">
<button type="button" id="search-city-submit-socolissimo" class="form-submit-button btn btn-block btn-default" title="{intl l='Search' d='socolissimo.fo.default'}">
<span class="glyphicon glyphicon-search"></span>
{intl l='Search' d='socolissimo.fo.default'}
</button>
</div>
<div class="clearfix col-md-12" style="margin-top: 15px;margin-bottom: 15px;">
<button type="submit" name="socolissimo-pr" value="PR" class="btn btn-primary pull-right">{intl l="Choose this delivery mode" d="socolissimo.fo.default"}</button>
</div>
</div>
</div>
</div>
<!-- // Search city -->
</div>
</div>
</div>
{/ifloop}
{/if}
</div>
</div>
</td>
</tr>
<script>
function loadScript() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://maps.googleapis.com/maps/api/js'
+ '?callback=SoColissimoInitialize'
+ '&key={config key="socolissimo_google_map_key"}';
document.body.appendChild(script);
}
if (typeof(google) == 'undefined') {
loadScript();
} else {
SoColissimoInitialize();
}
function SoColissimoInitialize() {
if (typeof initialize_so == 'function') {
initialize_so();
// Search city pseudo-form
document.getElementById("search-city-submit-socolissimo").onclick = search_city_socolissimo;
}
}
function displayContent () {
$("#google-map-socolissimo").closest('tr').show(function () {
$('.btn-checkout-next').hide();
if (typeof initialize_so == 'function') {
google.maps.event.trigger(mapSOC.map, 'resize');
}
});
}
$(function(){
if ($("#delivery-method_{$module}").is(':checked')) {
displayContent();
}
$('[name="socolissimo-pr"]').on('click', function(){
var radioChecked = $('input[type="radio"]:checked', '#table-socolissimo').length;
if (radioChecked === 0) {
alert("{intl l='No relay points were selected' d='socolissimo.fo.default'}");
return false;
}
});
$('[name="thelia_order_delivery[delivery-module]"]', '.table-delivery').on('change', function(){
if($(this).attr('id') != 'delivery-method_{$module}') {
$("#google-map-socolissimo").closest('tr').hide();
$('.btn-checkout-next').show();
} else {
displayContent();
}
});
if (typeof initialize_so == 'function') {
$(".toggle-type-socolissimo").on('change', function () {
updatemap_socolissimo();
});
$("#delivery-method").on('click', '.socolissimo_pr', function () {
markerId = $(this).data('marker');
google.maps.event.trigger(mapSOC.listMarker[markerId], 'click');
});
}
});
</script>
{/loop}