diff --git a/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php b/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php index 9ccc9781..34672c6e 100644 --- a/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php +++ b/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php @@ -54,8 +54,8 @@ class LivraisonParSecteurs extends AbstractDeliveryModule $zipcode = AddressQuery::create()->filterById($currentAddressId)->findOne($con)->getZipcode(); // Condition 1 : le client doit être situé dans un secteur couvert par la livraison à domicile. - if (null !== $areaId = LpsAreaCityQuery::create()->filterByZipcode($zipcode)->findOne($con)->getIdArea()) - { + if (null !== $areaFromZipcode = LpsAreaCityQuery::create()->filterByZipcode($zipcode)->findOne($con)) { + $areaId = $areaFromZipcode->getIdArea(); $area = LpsAreaQuery::create()->findOneById($areaId); // Condition 2 : le secteur doit être actif à date. diff --git a/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css b/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css index dc9926fd..bc3a11e5 100644 --- a/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css +++ b/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css @@ -14,13 +14,12 @@ h4 > b { } .lancer-impression { - font-size: 16px; - font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; font-weight: 600; margin: 0 0 0 20px !important; cursor: pointer; - background-color: red; - padding: 5px; + background-color: #ea5a0b; + padding: 5px 10px 5px 10px; color: white; } .lancer-impression::before { @@ -33,3 +32,8 @@ h4 > b { -moz-osx-font-smoothing: grayscale; padding-right: 8px; } + +.btn-info { + background-color: #95c11e; + border-color: #95c11e; +} \ No newline at end of file diff --git a/local/modules/PointRetrait/templates/frontOffice/default/assets/css/styles.css b/local/modules/PointRetrait/templates/frontOffice/default/assets/css/styles.css index bdd53898..4830f167 100644 --- a/local/modules/PointRetrait/templates/frontOffice/default/assets/css/styles.css +++ b/local/modules/PointRetrait/templates/frontOffice/default/assets/css/styles.css @@ -70,4 +70,8 @@ span.pin-number { margin: auto 60px 15px 30px; text-align: left; white-space: nowrap; +} + +div.Home { + height: 400px; } \ No newline at end of file diff --git a/local/modules/PointRetrait/templates/frontOffice/default/order-delivery-extra.html b/local/modules/PointRetrait/templates/frontOffice/default/order-delivery-extra.html index 96d551c0..e58d424b 100644 --- a/local/modules/PointRetrait/templates/frontOffice/default/order-delivery-extra.html +++ b/local/modules/PointRetrait/templates/frontOffice/default/order-delivery-extra.html @@ -1,3 +1,5 @@ + + @@ -134,6 +140,7 @@ Data.map = new google.maps.Map(document.getElementById('pdr_map'), opt); displayPinsPdr(); + displayHomePdr(); } function displayPinsPdr() { @@ -148,7 +155,30 @@ map: Data.map }); }); + } + 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); + } + }); }