Installation du module PayPlug
This commit is contained in:
@@ -71,7 +71,3 @@ span.pin-number {
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.Home {
|
||||
height: 400px;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -64,11 +64,8 @@
|
||||
{/form}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<input type="hidden" id="map-center-lat" value={{module_config module='PlanificationLivraison' key='map_center_latitude' locale='en_US'}|default:50.75075530537203} />
|
||||
<input type="hidden" id="map-center-lon" value={{module_config module='PlanificationLivraison' key='map_center_longitude' locale='en_US'}|default:2.252608244005041} />
|
||||
{loop type="address" name="address-home-loop" id={order attr="delivery_address"}}
|
||||
<input type="hidden" id="map-home-address" value="{$ADDRESS1}, {$ZIPCODE} {$CITY}">
|
||||
{/loop}
|
||||
<input type="hidden" id="home-map-center-lat" value="{module_config module='PlanificationLivraison' key='map_center_latitude' locale='en_US'}" />
|
||||
<input type="hidden" id="home-map-center-lng" value="{module_config module='PlanificationLivraison' key='map_center_longitude' locale='en_US'}" />
|
||||
|
||||
<table id="coordinates" class="hidden">
|
||||
{loop type="pdr_places" name="places-loop" active=true click_and_collect=0 order="city"}
|
||||
@@ -113,10 +110,11 @@
|
||||
|
||||
|
||||
function initMaps() {
|
||||
if (typeof initMapPdr === "function") initMapPdr();
|
||||
if (typeof initMapCnc === "function") initMapCnc();
|
||||
if (typeof initMapPdr === "function") initMapPdr();
|
||||
if (typeof initMapCnc === "function") initMapCnc();
|
||||
}
|
||||
|
||||
|
||||
function initMapPdr() {
|
||||
const LIMITES = {
|
||||
north: 50.85043724044059,
|
||||
@@ -126,7 +124,7 @@
|
||||
};
|
||||
|
||||
var opt = {
|
||||
center: new google.maps.LatLng($("#map-center-lat").val(), $("#map-center-lon").val()),
|
||||
center: new google.maps.LatLng($("#home-map-center-lat").val(), $("#home-map-center-lng").val()),
|
||||
zoom: 12,
|
||||
streetViewControl: true,
|
||||
mapTypeControl: true,
|
||||
@@ -140,9 +138,9 @@
|
||||
Data.map = new google.maps.Map(document.getElementById('pdr_map'), opt);
|
||||
|
||||
displayPinsPdr();
|
||||
displayHomePdr();
|
||||
}
|
||||
|
||||
|
||||
function displayPinsPdr() {
|
||||
var arrays = [];
|
||||
$('#coordinates').eq(0).find('tr').each((r,row) => arrays.push($(row).find('td,th').map((c,cell) => $(cell).text()).toArray()))
|
||||
@@ -157,30 +155,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
function displayHomePdr() {
|
||||
var geocoder = new google.maps.Geocoder();
|
||||
var adresse = $("#map-home-address").val();
|
||||
|
||||
geocoder.geocode({ address: adresse }, (results, status) => {
|
||||
if (status === "OK") {
|
||||
|
||||
var icon = {
|
||||
url: "http://maps.google.com/mapfiles/kml/shapes/homegardenbusiness.png", // url
|
||||
scaledSize: new google.maps.Size(30, 30) // scaled size
|
||||
};
|
||||
|
||||
marker = new google.maps.Marker({
|
||||
map: Data.map,
|
||||
position: results[0].geometry.location,
|
||||
title: "Home",
|
||||
icon : icon
|
||||
});
|
||||
} else {
|
||||
alert("Geocode was not successful for the following reason: " + status);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user