diff --git a/core/lib/Thelia/Model/Order.php b/core/lib/Thelia/Model/Order.php
index 46beab07..1a32f8aa 100644
--- a/core/lib/Thelia/Model/Order.php
+++ b/core/lib/Thelia/Model/Order.php
@@ -536,4 +536,5 @@ class Order extends BaseOrder
? $event->getManageStock()
: $paymentModule->manageStockOnCreation();
}
+
}
diff --git a/local/modules/LivraisonParSecteurs/Hook/EmailHook.php b/local/modules/LivraisonParSecteurs/Hook/EmailHook.php
index e9963b91..b3bd0de2 100644
--- a/local/modules/LivraisonParSecteurs/Hook/EmailHook.php
+++ b/local/modules/LivraisonParSecteurs/Hook/EmailHook.php
@@ -5,6 +5,7 @@ namespace LivraisonParSecteurs\Hook;
use LivraisonParSecteurs\LivraisonParSecteurs;
use Thelia\Core\Event\Hook\HookRenderEvent;
use Thelia\Core\Hook\BaseHook;
+use Thelia\Exception\TheliaProcessException;
class EmailHook extends BaseHook
{
@@ -16,9 +17,10 @@ class EmailHook extends BaseHook
if ((null !== $orderId) && ($moduleId == LivraisonParSecteurs::getModuleId()))
{
- $selectedDay = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_DATE);
- $beginTime = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_BEGIN_TIME);
- $endTime = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_END_TIME);
+ $lpsData = $this->getSession()->get('lpsData');
+ $selectedDay = $lpsData->getDeliveryDate();
+ $beginTime = $lpsData->getDeliveryStartTime();
+ $endTime = $lpsData->getDeliveryEndTime();
if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) )
{
@@ -31,6 +33,8 @@ class EmailHook extends BaseHook
])
);
}
+ else
+ throw new TheliaProcessException("LivraisonParSecteurs : Impossible de récupérer les données de session LpsData : ");
}
}
diff --git a/local/modules/LivraisonParSecteurs/Hook/FrontHook.php b/local/modules/LivraisonParSecteurs/Hook/FrontHook.php
index c55ad7f9..e0aa9f74 100644
--- a/local/modules/LivraisonParSecteurs/Hook/FrontHook.php
+++ b/local/modules/LivraisonParSecteurs/Hook/FrontHook.php
@@ -3,12 +3,13 @@
namespace LivraisonParSecteurs\Hook;
use LivraisonParSecteurs\LivraisonParSecteurs;
-use LivraisonParSecteurs\Model\Base\LpsAreaCityQuery;
+use LivraisonParSecteurs\Model\LpsAreaCityQuery;
use Propel\Runtime\Exception\PropelException as PropelException;
use Propel\Runtime\Propel;
use Thelia\Core\Event\Hook\HookRenderEvent;
use Thelia\Core\Hook\BaseHook;
use Thelia\Core\Translation\Translator;
+use Thelia\Exception\TheliaProcessException;
use Thelia\Model\AddressQuery;
use Thelia\Module\Exception\DeliveryException;
@@ -44,11 +45,13 @@ class FrontHook extends BaseHook
public function displayDeliveryDate(HookRenderEvent $event)
{
- if ((null !== $order = $this->getSession()->getOrder()) && $order->getDeliveryModuleId() == LivraisonParSecteurs::getModuleId())
+ $order = $this->getSession()->getOrder();
+ if ((null !== $order) && $order->getDeliveryModuleId() == LivraisonParSecteurs::getModuleId())
{
- $selectedDay = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_DATE);
- $beginTime = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_BEGIN_TIME);
- $endTime = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_END_TIME);
+ $lpsData = $this->getSession()->get('lpsData');
+ $selectedDay = $lpsData->getDeliveryDate();
+ $beginTime = $lpsData->getDeliveryStartTime();
+ $endTime = $lpsData->getDeliveryEndTime();
if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) )
{
@@ -61,6 +64,8 @@ class FrontHook extends BaseHook
])
);
}
+ else
+ throw new TheliaProcessException("LivraisonParSecteurs : Impossible de récupérer les données de session LpsData : " . $event->getMessage());
}
}
diff --git a/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php b/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php
index 50bce3f2..b3c2f316 100644
--- a/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php
+++ b/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php
@@ -11,10 +11,7 @@ use Propel\Runtime\Propel;
use Thelia\Core\Translation\Translator;
use Thelia\Install\Database;
use Thelia\Model\AddressQuery;
-use Thelia\Model\ConfigQuery;
use Thelia\Model\Country;
-use Thelia\Model\ModuleConfigI18nQuery;
-use Thelia\Model\ModuleConfigQuery;
use Thelia\Model\OrderPostage;
use Thelia\Module\AbstractDeliveryModule;
use Thelia\Module\Exception\DeliveryException;
diff --git a/local/modules/LivraisonParSecteurs/templates/backOffice/default/delivery-address.html b/local/modules/LivraisonParSecteurs/templates/backOffice/default/delivery-address.html
index ac2b3a2e..618227ba 100644
--- a/local/modules/LivraisonParSecteurs/templates/backOffice/default/delivery-address.html
+++ b/local/modules/LivraisonParSecteurs/templates/backOffice/default/delivery-address.html
@@ -1,8 +1,8 @@
| |
- | {intl l="Scheduled date" d="livraisonparsecteurs"} |
- {$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"} |
+ {intl l="Scheduled date" d="livraisonparsecteurs"} | -->
+ {$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"} | -->
| |
diff --git a/local/modules/LivraisonParSecteurs/templates/backOffice/default/js/area-schedule-js.html b/local/modules/LivraisonParSecteurs/templates/backOffice/default/js/area-schedule-js.html
index 28916344..b4645201 100644
--- a/local/modules/LivraisonParSecteurs/templates/backOffice/default/js/area-schedule-js.html
+++ b/local/modules/LivraisonParSecteurs/templates/backOffice/default/js/area-schedule-js.html
@@ -36,5 +36,6 @@
format: 'YYYY-MM-DD'
});
});
+
});
diff --git a/local/modules/LivraisonParSecteurs/templates/frontOffice/default/order-delivery-extra.html b/local/modules/LivraisonParSecteurs/templates/frontOffice/default/order-delivery-extra.html
index 191a19e3..e178c667 100644
--- a/local/modules/LivraisonParSecteurs/templates/frontOffice/default/order-delivery-extra.html
+++ b/local/modules/LivraisonParSecteurs/templates/frontOffice/default/order-delivery-extra.html
@@ -85,9 +85,17 @@
if ($('[delivery-mode=lps]').is(':checked')
&&
$('input[name=lps-choosen-day]:checked').length === 0) {
- alert("{intl l='Please select a delivery day' d='livraisonparsecteurs' js=1}");
+ alert("Veuillez choisir un jour de livraison.");
+ ev.preventDefault();
+ }
+
+ if ($('[delivery-mode=pdr]').is(':checked')
+ &&
+ $('input[name=pdr-choosen-day]:checked').length === 0) {
+ alert("Veuillez choisir un point de retrait.");
ev.preventDefault();
}
});
+
diff --git a/local/modules/PlanificationLivraison/Config/config.xml b/local/modules/PlanificationLivraison/Config/config.xml
index fa3d23a9..2c4f67a3 100644
--- a/local/modules/PlanificationLivraison/Config/config.xml
+++ b/local/modules/PlanificationLivraison/Config/config.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php b/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php
index 1ba775e9..78d0c3f6 100644
--- a/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php
+++ b/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php
@@ -6,7 +6,8 @@ use DateTime;
use LivraisonParSecteurs\LivraisonParSecteurs;
use LivraisonParSecteurs\Model\LpsAreaScheduleQuery;
use PlanificationLivraison\Model\OrderDeliverySchedule;
-use PlanificationLivraison\PlanificationLivraison;
+use PointRetrait\Model\PdrScheduleQuery;
+use PointRetrait\PointRetrait;
use Propel\Runtime\Propel;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -17,7 +18,8 @@ use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\HttpFoundation\Session\Session;
use Thelia\Exception\TheliaProcessException;
-use Thelia\Files\Exception\ProcessFileException;
+use Thelia\Model\ModuleQuery;
+use PlanificationLivraison\Model\SessionData;
class DeliveryListener extends BaseAction implements EventSubscriberInterface
@@ -47,22 +49,48 @@ class DeliveryListener extends BaseAction implements EventSubscriberInterface
/** @var Session $session */
$session = $request->getSession();
- if ($event->getDeliveryModule() == LivraisonParSecteurs::getModuleId()) {
- if (null !== $scheduleId = $request->get('lps-choosen-day', null)) {
- $session->set(LivraisonParSecteurs::LPS_AREA_SCHEDULE_ID, $scheduleId);
- $session->set(LivraisonParSecteurs::LPS_CHOSEN_ADDRESS, $session->getOrder()->getChoosenDeliveryAddress());
+ $module = $event->getDeliveryModule();
+ $moduleActif = ModuleQuery::create()->findOneById($module)->getActivate();
+ if ($moduleActif) {
- $scheduleId = $session->get(LivraisonParSecteurs::LPS_AREA_SCHEDULE_ID);
- $schedule = LpsAreaScheduleQuery::create()->findOneById($scheduleId);
+ if ($module == LivraisonParSecteurs::getModuleId()) {
+ if (null !== $scheduleId = $request->get('lps-choosen-day', null)) {
- $chosenDate = LivraisonParSecteurs::calculateRelativeDate($schedule->getDay());
+ $lpsData = new SessionData();
+ $lpsData->setDeliveryAddressId($session->getOrder()->getChoosenDeliveryAddress());
+ $lpsData->setAreaScheduleId($scheduleId);
- // On sauvegarde la date de livraison choisie avec les heures, pour affichage ultérieur.
- $completeDay = LivraisonParSecteurs::getDayLabel($schedule->getDay());
- $completeDay .= " " . $chosenDate->format(LivraisonParSecteurs::FORMAT_DATES);
- $session->set(LivraisonParSecteurs::LPS_DELIVERY_DATE, $completeDay);
- $session->set(LivraisonParSecteurs::LPS_DELIVERY_BEGIN_TIME, $schedule->getBeginTime());
- $session->set(LivraisonParSecteurs::LPS_DELIVERY_END_TIME, $schedule->getEndTime());
+ // On sauvegarde la date de livraison choisie avec les heures, pour affichage ultérieur.
+ $schedule = LpsAreaScheduleQuery::create()->findOneById($scheduleId);
+ $chosenDate = LivraisonParSecteurs::calculateRelativeDate($schedule->getDay());
+ $completeDay = LivraisonParSecteurs::getDayLabel($schedule->getDay());
+ $completeDay .= " " . $chosenDate->format(LivraisonParSecteurs::FORMAT_DATES);
+
+ $lpsData->setDeliveryDate($completeDay);
+ $lpsData->setDeliveryStartTime($schedule->getBeginTime());
+ $lpsData->setDeliveryEndTime($schedule->getEndTime());
+
+ $session->set('lpsData', $lpsData);
+ }
+ }
+
+ if ($module == PointRetrait::getModuleId()) {
+ if (null !== $scheduleId = $request->get('pdr-choosen-day', null)) {
+ $schedule =PdrScheduleQuery::create()->findOneById($scheduleId);
+ $placeId = $schedule->getIdPlace();
+
+ $session->set(PointRetrait::PDR_PLACE_SCHEDULE_ID, $scheduleId);
+ $session->set(PointRetrait::PDR_CHOSEN_PLACE, $placeId);
+
+ $chosenDate = PointRetrait::calculateRelativeDate($schedule->getDay());
+
+ // On sauvegarde la date de livraison choisie avec les heures, pour affichage ultérieur.
+ $completeDay = PointRetrait::getDayLabel($schedule->getDay());
+ $completeDay .= " " . $chosenDate->format(PointRetrait::FORMAT_DATES);
+ $session->set(PointRetrait::PDR_DELIVERY_DATE, $completeDay);
+ $session->set(PointRetrait::PDR_DELIVERY_BEGIN_TIME, $schedule->getBeginTime());
+ $session->set(PointRetrait::PDR_DELIVERY_END_TIME, $schedule->getEndTime());
+ }
}
}
}
@@ -77,10 +105,16 @@ class DeliveryListener extends BaseAction implements EventSubscriberInterface
$session = $this->requestStack->getCurrentRequest()->getSession();
$order = $event->getOrder();
-
$deliveryModuleId = $order->getDeliveryModuleId();
+
if ($deliveryModuleId == LivraisonParSecteurs::getModuleId()) {
- $scheduleId = $session->get(LivraisonParSecteurs::LPS_AREA_SCHEDULE_ID);
+
+ $lpsData = new SessionData();
+ $lpsData = $session->get('lpsData');
+ if ($lpsData === null)
+ throw new TheliaProcessException("PlanificationLivraison : Données de session LpsData vides : " . $event->getMessage());
+
+ $scheduleId = $lpsData->getAreaScheduleId();
$orderId = $order->getId();
$con = Propel::getConnection();
@@ -89,7 +123,7 @@ class DeliveryListener extends BaseAction implements EventSubscriberInterface
try {
$query->setOrderId($orderId);
$query->setScheduleId($scheduleId);
- $query->setDeliveryAddressId($session->get(LivraisonParSecteurs::LPS_CHOSEN_ADDRESS));
+ $query->setDeliveryAddressId($lpsData->getDeliveryAddressId());
$schedule = LpsAreaScheduleQuery::create()->findOneById($scheduleId);
$chosenDate = LivraisonParSecteurs::calculateRelativeDate($schedule->getDay());
diff --git a/local/modules/PlanificationLivraison/Hook/HookManager.php b/local/modules/PlanificationLivraison/Hook/BackHook.php
similarity index 87%
rename from local/modules/PlanificationLivraison/Hook/HookManager.php
rename to local/modules/PlanificationLivraison/Hook/BackHook.php
index 18c88064..3148cad4 100644
--- a/local/modules/PlanificationLivraison/Hook/HookManager.php
+++ b/local/modules/PlanificationLivraison/Hook/BackHook.php
@@ -6,10 +6,10 @@ use Thelia\Core\Event\Hook\HookRenderEvent;
use Thelia\Core\Hook\BaseHook;
/**
- * Class HookManager
+ * Class BackHook
* @package PlanificationLivraison\Hook
*/
-class HookManager extends BaseHook
+class BackHook extends BaseHook
{
public function onModuleConfiguration(HookRenderEvent $event)
{
diff --git a/local/modules/PlanificationLivraison/Model/SessionData.php b/local/modules/PlanificationLivraison/Model/SessionData.php
new file mode 100644
index 00000000..4e084519
--- /dev/null
+++ b/local/modules/PlanificationLivraison/Model/SessionData.php
@@ -0,0 +1,96 @@
+deliveryAddressId;
+ }
+
+ /**
+ * @param null $deliveryAddressId
+ */
+ public function setDeliveryAddressId($deliveryAddressId)
+ {
+ $this->deliveryAddressId = $deliveryAddressId;
+ }
+
+ /**
+ * @return null
+ */
+ public function getAreaScheduleId()
+ {
+ return $this->areaScheduleId;
+ }
+
+ /**
+ * @param null $areaScheduleId
+ */
+ public function setAreaScheduleId($areaScheduleId)
+ {
+ $this->areaScheduleId = $areaScheduleId;
+ }
+
+ /**
+ * @return null
+ */
+ public function getDeliveryDate()
+ {
+ return $this->deliveryDate;
+ }
+
+ /**
+ * @param null $deliveryDate
+ */
+ public function setDeliveryDate($deliveryDate)
+ {
+ $this->deliveryDate = $deliveryDate;
+ }
+
+ /**
+ * @return null
+ */
+ public function getDeliveryStartTime()
+ {
+ return $this->deliveryStartTime;
+ }
+
+ /**
+ * @param null $deliveryStartTime
+ */
+ public function setDeliveryStartTime($deliveryStartTime)
+ {
+ $this->deliveryStartTime = $deliveryStartTime;
+ }
+
+ /**
+ * @return null
+ */
+ public function getDeliveryEndTime()
+ {
+ return $this->deliveryEndTime;
+ }
+
+ /**
+ * @param null $deliveryEndTime
+ */
+ public function setDeliveryEndTime($deliveryEndTime)
+ {
+ $this->deliveryEndTime = $deliveryEndTime;
+ }
+
+
+}
\ No newline at end of file
diff --git a/local/modules/PointRetrait/I18n/fr_FR.php b/local/modules/PointRetrait/I18n/fr_FR.php
index 8d74a4c5..2887d25d 100644
--- a/local/modules/PointRetrait/I18n/fr_FR.php
+++ b/local/modules/PointRetrait/I18n/fr_FR.php
@@ -21,12 +21,14 @@ return array(
'Location set' => 'Coordonnées GPS présentes ?',
'Main' => 'Généralités',
'Message no location' => 'Ce point de retrait ne possède pas de coordonnées GPS : pour vos clients, il est conseillé de géolocaliser l\'adresse.',
+ 'Message info minimum de commande' => 'Vous n\'avez pas atteint le minimum de commande de %minimum € sur ce point de retrait.',
'Minimum amount' => 'Minimum de commande',
'Module name' => 'Point de Retrait AuxBieauxLegumes',
'My places' => 'Point de retrait AuxBieauxLegumes',
'My withdrawal places' => 'Mes points de retrait AuxBieauxLegumes',
'Order number' => 'N° de commande',
'Place name' => 'Nom du point de retrait',
+ 'Please select a delivery place' => 'Veuillez sélectionner un point de retrait',
'Recenter map' => 'Géolocaliser l\'adresse',
'Revert origin position' => 'Revenir à la position d\'origine',
'Schedule' => 'Horaires de retrait',
diff --git a/local/modules/PointRetrait/Loop/ScheduleLoop.php b/local/modules/PointRetrait/Loop/ScheduleLoop.php
index e8e8aab9..8d7134d0 100644
--- a/local/modules/PointRetrait/Loop/ScheduleLoop.php
+++ b/local/modules/PointRetrait/Loop/ScheduleLoop.php
@@ -40,6 +40,7 @@ class ScheduleLoop extends BaseLoop implements PropelSearchLoopInterface
->set("DAY_LABEL", PointRetrait::getDayLabel($pdr_schedule->getDay()))
->set("BEGIN", $pdr_schedule->getBeginTime())
->set("END", $pdr_schedule->getEndTime())
+ ->set("CALCULATED_DAY", PointRetrait::calculateRelativeDate($pdr_schedule->getDay())->format(PointRetrait::FORMAT_DATES))
;
$loopResult->addRow($loopResultRow);
}
diff --git a/local/modules/PointRetrait/PointRetrait.php b/local/modules/PointRetrait/PointRetrait.php
index 12ddf18c..5c35157d 100644
--- a/local/modules/PointRetrait/PointRetrait.php
+++ b/local/modules/PointRetrait/PointRetrait.php
@@ -2,6 +2,9 @@
namespace PointRetrait;
+use PlanificationLivraison\PlanificationLivraison;
+use PointRetrait\Model\PdrPlacesQuery;
+use PointRetrait\Model\PdrScheduleQuery;
use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Propel;
use Thelia\Core\Translation\Translator;
@@ -11,6 +14,8 @@ use Thelia\Model\Country;
use Thelia\Model\OrderPostage;
use Thelia\Module\AbstractDeliveryModule;
use Thelia\Module\Exception\DeliveryException;
+use DateInterval;
+
class PointRetrait extends AbstractDeliveryModule
@@ -19,6 +24,13 @@ class PointRetrait extends AbstractDeliveryModule
const DOMAIN_NAME = 'pointretrait';
const MESSAGE_DOMAIN = 'pointretrait';
const MODULE_URL = '/admin/module/PointRetrait';
+ const FORMAT_DATES = 'd/m/Y';
+ const PDR_PLACE_SCHEDULE_ID = 'pdr_place_schedule_id';
+ const PDR_CHOSEN_PLACE = 'pdr_chosen_place';
+ const PDR_DELIVERY_DATE = 'pdr_delivery_date';
+ const PDR_DELIVERY_BEGIN_TIME = 'pdr_begin_time';
+ const PDR_DELIVERY_END_TIME = 'pdr_end_time';
+
/**
@@ -65,12 +77,9 @@ class PointRetrait extends AbstractDeliveryModule
}
$price = 0;
- $con = Propel::getConnection();
- $currentAddressId = $this->getRequest()->getSession()->getOrder()->getChoosenDeliveryAddress();
- if (!empty($currentAddressId)) {
- $zipcode = AddressQuery::create()->filterById($currentAddressId)->findOne($con)->getZipcode();
-// $areaId = LpsAreaCityQuery::create()->findOneByZipcode($zipcode)->getIdArea();
-// $price = LpsAreaQuery::create()->findOneById($areaId)->getPrice();
+ if (null !== $chosenPlace = $this->getRequest()->get(('pdr-choosen-day'))) {
+ $placeId = PdrScheduleQuery::create()->findOneById($chosenPlace)->getIdPlace();
+ $price = PdrPlacesQuery::create()->findOneById($placeId)->getPrice();
}
return $price;
@@ -97,4 +106,39 @@ class PointRetrait extends AbstractDeliveryModule
return $days[$int];
}
+ static public function calculateRelativeDate($baseDay)
+ {
+ $minimumDelayBeforeOrder = PlanificationLivraison::getConfigValue(PlanificationLivraison::CONFIG_PREPARATION_DELAY, 0, "en_US");
+
+ $date = new \DateTime();
+ $date->add(new DateInterval('P'. $minimumDelayBeforeOrder . 'D'));
+
+ $nextPossibleDay = '';
+ switch ($baseDay) {
+ case 0 :
+ $nextPossibleDay = $date->modify('next monday');
+ break;
+ case 1 :
+ $nextPossibleDay = $date->modify('next tuesday');
+ break;
+ case 2 :
+ $nextPossibleDay = $date->modify('next wednesday');
+ break;
+ case 3 :
+ $nextPossibleDay = $date->modify('next thursday');
+ break;
+ case 4 :
+ $nextPossibleDay = $date->modify('next friday');
+ break;
+ case 5 :
+ $nextPossibleDay = $date->modify('next saturday');
+ break;
+ case 6 :
+ $nextPossibleDay = $date->modify('next sunday');
+ break;
+ }
+
+ return $nextPossibleDay;
+ }
+
}
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 700b03ea..e014f5e1 100644
--- a/local/modules/PointRetrait/templates/frontOffice/default/order-delivery-extra.html
+++ b/local/modules/PointRetrait/templates/frontOffice/default/order-delivery-extra.html
@@ -21,9 +21,9 @@
-
+
{form name="thelia.order.delivery"}
-
+
{loop type="pdr_places" name="places-loop" active=true order="city"}
@@ -31,14 +31,21 @@
{$ID}{$TITLE}
{$ADDRESS1}
{$ZIPCODE} {$CITY}
+ {if {cart attr='total_taxed_price_without_discount'} < $MINIMUM_AMOUNT}
+
+
{intl l="Message info minimum de commande" d="pointretrait" minimum=$MINIMUM_AMOUNT}
+
+ {else}
+ {/if}
+
{if $PRICE > 0}
{format_number number=$PRICE} €
@@ -53,7 +60,7 @@
{/form}
-
+
@@ -93,14 +100,6 @@
}
});
- $("#form-cart-delivery").off('submit').submit(function(ev) {
- if ($('[delivery-mode=pdr]').is(':checked')
- &&
- $('input[name=pdr-choosen-day]:checked').length === 0) {
- alert("{intl l='Please select a withdrawal' d='pointretrait' js=1}");
- ev.preventDefault();
- }
- });
function loadScript() {
var script = document.createElement('script');
@@ -121,9 +120,8 @@
var opt = {
center: new google.maps.LatLng($("#map-center-lat").val(), $("#map-center-lon").val()),
zoom: 12,
- streetViewControl: false,
- mapTypeControl: false,
- disableDefaultUI: true,
+ streetViewControl: true,
+ mapTypeControl: true,
restriction: {
latLngBounds: LIMITES,
strictBounds: false,