diff --git a/local/modules/LivraisonParSecteurs/Config/config.xml b/local/modules/LivraisonParSecteurs/Config/config.xml index bd9983f0..f9d83e2d 100644 --- a/local/modules/LivraisonParSecteurs/Config/config.xml +++ b/local/modules/LivraisonParSecteurs/Config/config.xml @@ -20,20 +20,24 @@ + + + + diff --git a/local/modules/LivraisonParSecteurs/Form/ScheduleCreateForm.php b/local/modules/LivraisonParSecteurs/Form/ScheduleCreateForm.php index 43a4d84e..70b4ad93 100644 --- a/local/modules/LivraisonParSecteurs/Form/ScheduleCreateForm.php +++ b/local/modules/LivraisonParSecteurs/Form/ScheduleCreateForm.php @@ -3,6 +3,7 @@ namespace LivraisonParSecteurs\Form; use LivraisonParSecteurs\LivraisonParSecteurs; +use PlanificationLivraison\PlanificationLivraison; use Thelia\Form\BaseForm; use Symfony\Component\Validator\Constraints; @@ -25,7 +26,7 @@ class ScheduleCreateForm extends BaseForm "constraints" => [new Constraints\NotBlank()] ]) ->add("day", "choice", [ - "choices" => LivraisonParSecteurs::getDayLabel(null), + "choices" => PlanificationLivraison::getDayLabel(null), "label" => $this->translator->trans("Delivery day", [], LivraisonParSecteurs::MESSAGE_DOMAIN), "label_attr" => ["for" => "attr-area-schedule-day"], "required" => true, diff --git a/local/modules/LivraisonParSecteurs/Form/ScheduleUpdateForm.php b/local/modules/LivraisonParSecteurs/Form/ScheduleUpdateForm.php index 134cae84..2be60d27 100644 --- a/local/modules/LivraisonParSecteurs/Form/ScheduleUpdateForm.php +++ b/local/modules/LivraisonParSecteurs/Form/ScheduleUpdateForm.php @@ -3,6 +3,7 @@ namespace LivraisonParSecteurs\Form; use LivraisonParSecteurs\LivraisonParSecteurs; +use PlanificationLivraison\PlanificationLivraison; use Thelia\Form\BaseForm; use Symfony\Component\Validator\Constraints; @@ -31,7 +32,7 @@ class ScheduleUpdateForm extends BaseForm "constraints" => [new Constraints\NotBlank()] ]) ->add("day", "choice", [ - "choices" => LivraisonParSecteurs::getDayLabel(null), + "choices" => PlanificationLivraison::getDayLabel(null), "label" => $this->translator->trans("Delivery day", [], LivraisonParSecteurs::MESSAGE_DOMAIN), "label_attr" => ["for" => "attr-area-schedule-day"], "required" => true, diff --git a/local/modules/LivraisonParSecteurs/Hook/AdminHook.php b/local/modules/LivraisonParSecteurs/Hook/AdminHook.php index a18aa6a9..2913fe56 100644 --- a/local/modules/LivraisonParSecteurs/Hook/AdminHook.php +++ b/local/modules/LivraisonParSecteurs/Hook/AdminHook.php @@ -36,21 +36,6 @@ class AdminHook extends BaseHook } -// public function onModuleConfig(HookRenderEvent $event) -// { -// $isGranted = $this->securityContext->isGranted( -// ["ADMIN"], -// [], -// [LivraisonParSecteurs::getModuleCode()], -// [AccessManager::VIEW] -// ); -// -// if ($isGranted) { -// $event->add($this->render("deliveryarea-list.html", $event->getArguments())); -// } -// } - - /* Pour intégrer la date prévue de livraison dans différents formulaires (email, backOffice, ...) */ public function displayDeliveryDate(HookRenderEvent $event) { @@ -60,9 +45,10 @@ class AdminHook 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) ) { diff --git a/local/modules/LivraisonParSecteurs/Hook/FrontHook.php b/local/modules/LivraisonParSecteurs/Hook/FrontHook.php index e0aa9f74..c304e691 100644 --- a/local/modules/LivraisonParSecteurs/Hook/FrontHook.php +++ b/local/modules/LivraisonParSecteurs/Hook/FrontHook.php @@ -48,10 +48,10 @@ class FrontHook extends BaseHook $order = $this->getSession()->getOrder(); if ((null !== $order) && $order->getDeliveryModuleId() == LivraisonParSecteurs::getModuleId()) { - $lpsData = $this->getSession()->get('lpsData'); - $selectedDay = $lpsData->getDeliveryDate(); - $beginTime = $lpsData->getDeliveryStartTime(); - $endTime = $lpsData->getDeliveryEndTime(); + $sessionData = $this->getSession()->get('lpsData'); + $selectedDay = $sessionData->getDeliveryDate(); + $beginTime = $sessionData->getDeliveryStartTime(); + $endTime = $sessionData->getDeliveryEndTime(); if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) { @@ -65,7 +65,7 @@ class FrontHook extends BaseHook ); } else - throw new TheliaProcessException("LivraisonParSecteurs : Impossible de récupérer les données de session LpsData : " . $event->getMessage()); + throw new TheliaProcessException("LivraisonParSecteurs : Impossible de récupérer les données de session LpsData"); } } diff --git a/local/modules/LivraisonParSecteurs/I18n/fr_FR.php b/local/modules/LivraisonParSecteurs/I18n/fr_FR.php index aa3a6c02..cc2472d8 100644 --- a/local/modules/LivraisonParSecteurs/I18n/fr_FR.php +++ b/local/modules/LivraisonParSecteurs/I18n/fr_FR.php @@ -46,11 +46,4 @@ return array( 'There is no schedule for this area' => 'Aucune livraison actuellement sur ce secteur', 'Title of config view' => 'Livraison à domicile - Configuration', 'Zipcode' => 'Code postal', 'Monday' => 'Lundi', - 'Tuesday' => 'Mardi', - 'Wednesday' => 'Mercredi', - 'Thursday' => 'Jeudi', - 'Friday' => 'Vendredi', - 'Saturday' => 'Samedi', - 'Sunday' => 'Dimanche', - ); diff --git a/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php b/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php index b3c2f316..ee57d1e8 100644 --- a/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php +++ b/local/modules/LivraisonParSecteurs/LivraisonParSecteurs.php @@ -2,10 +2,8 @@ namespace LivraisonParSecteurs; -use DateInterval; use LivraisonParSecteurs\Model\LpsAreaCityQuery; use LivraisonParSecteurs\Model\LpsAreaQuery; -use PlanificationLivraison\PlanificationLivraison; use Propel\Runtime\Connection\ConnectionInterface; use Propel\Runtime\Propel; use Thelia\Core\Translation\Translator; @@ -22,13 +20,6 @@ class LivraisonParSecteurs extends AbstractDeliveryModule /** @var string */ const DOMAIN_NAME = 'livraisonparsecteurs'; const MESSAGE_DOMAIN = 'livraisonparsecteurs'; - const LPS_AREA_SCHEDULE_ID = 'lps_area_schedule_id'; - const LPS_CHOSEN_ADDRESS = 'lps_chosen_delivery_address'; - const LPS_DELIVERY_DATE = 'lps_delivery_date'; - const LPS_DELIVERY_BEGIN_TIME = 'lps_begin_time'; - const LPS_DELIVERY_END_TIME = 'lps_end_time'; - const FORMAT_DATES = 'd/m/Y'; - const FORMAT_DATE_COMPLETE = 'Y-m-d H:i:s'; const SECTEUR_ACTIF = 1; @@ -104,58 +95,4 @@ class LivraisonParSecteurs extends AbstractDeliveryModule return $price; } - static public function getDayLabel($int) - { - $translator = Translator::getInstance(); - - $days = [ - $translator->trans("Monday", [], LivraisonParSecteurs::MESSAGE_DOMAIN), - $translator->trans("Tuesday", [], LivraisonParSecteurs::MESSAGE_DOMAIN), - $translator->trans("Wednesday", [], LivraisonParSecteurs::MESSAGE_DOMAIN), - $translator->trans("Thursday", [], LivraisonParSecteurs::MESSAGE_DOMAIN), - $translator->trans("Friday", [], LivraisonParSecteurs::MESSAGE_DOMAIN), - $translator->trans("Saturday", [], LivraisonParSecteurs::MESSAGE_DOMAIN), - $translator->trans("Sunday", [], LivraisonParSecteurs::MESSAGE_DOMAIN) - ]; - - if ($int === null) - return $days; - else - 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/LivraisonParSecteurs/Loop/AreaLoop.php b/local/modules/LivraisonParSecteurs/Loop/AreaLoop.php index 2fa452bb..82b33d80 100644 --- a/local/modules/LivraisonParSecteurs/Loop/AreaLoop.php +++ b/local/modules/LivraisonParSecteurs/Loop/AreaLoop.php @@ -5,6 +5,7 @@ namespace LivraisonParSecteurs\Loop; use LivraisonParSecteurs\LivraisonParSecteurs; use LivraisonParSecteurs\Model\LpsAreaCityQuery; use LivraisonParSecteurs\Model\LpsAreaScheduleQuery; +use PlanificationLivraison\PlanificationLivraison; use Thelia\Core\Template\Element\BaseLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; @@ -37,7 +38,7 @@ class AreaLoop extends BaseLoop implements PropelSearchLoopInterface $schedule = LpsAreaScheduleQuery::create()->findByIdArea($lps_area->getId()); $deliveryDays = ""; foreach ($schedule as $day) { - $deliveryDays .= LivraisonParSecteurs::getDayLabel($day->getDay()) . ', '; + $deliveryDays .= PlanificationLivraison::getDayLabel($day->getDay()) . ', '; } $deliveryDays = substr($deliveryDays, 0, strlen($deliveryDays)-2); diff --git a/local/modules/LivraisonParSecteurs/Loop/AreaScheduleLoop.php b/local/modules/LivraisonParSecteurs/Loop/AreaScheduleLoop.php index 3bcbfcd1..693520fd 100644 --- a/local/modules/LivraisonParSecteurs/Loop/AreaScheduleLoop.php +++ b/local/modules/LivraisonParSecteurs/Loop/AreaScheduleLoop.php @@ -4,6 +4,7 @@ namespace LivraisonParSecteurs\Loop; use LivraisonParSecteurs\LivraisonParSecteurs; use LivraisonParSecteurs\Model\LpsAreaScheduleQuery; +use PlanificationLivraison\PlanificationLivraison; use Thelia\Core\Template\Element\BaseLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; @@ -36,10 +37,10 @@ class AreaScheduleLoop extends BaseLoop implements PropelSearchLoopInterface ->set("ID", $lps_area_schedule->getId()) ->set("AREA_ID", $lps_area_schedule->getIdArea()) ->set("DAY", $lps_area_schedule->getDay()) - ->set("DAY_LABEL", LivraisonParSecteurs::getDayLabel($lps_area_schedule->getDay())) + ->set("DAY_LABEL", PlanificationLivraison::getDayLabel($lps_area_schedule->getDay())) ->set("BEGIN", $lps_area_schedule->getBeginTime()) ->set("END", $lps_area_schedule->getEndTime()) - ->set("CALCULATED_DAY", LivraisonParSecteurs::calculateRelativeDate($lps_area_schedule->getDay())->format(LivraisonParSecteurs::FORMAT_DATES)) + ->set("CALCULATED_DAY", PlanificationLivraison::calculateRelativeDate($lps_area_schedule->getDay())->format(PlanificationLivraison::FORMAT_DATES)) ; $loopResult->addRow($loopResultRow); } diff --git a/local/modules/LivraisonParSecteurs/templates/backOffice/default/delivery-address.html b/local/modules/LivraisonParSecteurs/templates/backOffice/default/delivery-address.html index 618227ba..ac2b3a2e 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/PlanificationLivraison/Config/config.xml b/local/modules/PlanificationLivraison/Config/config.xml index 2c4f67a3..456b2fb3 100644 --- a/local/modules/PlanificationLivraison/Config/config.xml +++ b/local/modules/PlanificationLivraison/Config/config.xml @@ -15,7 +15,6 @@
- @@ -24,6 +23,9 @@ + + + diff --git a/local/modules/PlanificationLivraison/Config/schema.xml b/local/modules/PlanificationLivraison/Config/schema.xml index c9f13b24..93ad147e 100644 --- a/local/modules/PlanificationLivraison/Config/schema.xml +++ b/local/modules/PlanificationLivraison/Config/schema.xml @@ -19,9 +19,6 @@ - - - diff --git a/local/modules/PlanificationLivraison/Config/sqldb.map b/local/modules/PlanificationLivraison/Config/sqldb.map deleted file mode 100644 index 63a93baa..00000000 --- a/local/modules/PlanificationLivraison/Config/sqldb.map +++ /dev/null @@ -1,2 +0,0 @@ -# Sqlfile -> Database map -thelia.sql=thelia diff --git a/local/modules/PlanificationLivraison/Config/thelia.sql b/local/modules/PlanificationLivraison/Config/thelia.sql deleted file mode 100644 index 13abe44e..00000000 --- a/local/modules/PlanificationLivraison/Config/thelia.sql +++ /dev/null @@ -1,41 +0,0 @@ - -# This is a fix for InnoDB in MySQL >= 4.1.x -# It "suspends judgement" for fkey relationships until are tables are set. -SET FOREIGN_KEY_CHECKS = 0; - --- --------------------------------------------------------------------- --- order_delivery_schedule --- --------------------------------------------------------------------- - -DROP TABLE IF EXISTS `order_delivery_schedule`; - -CREATE TABLE `order_delivery_schedule` -( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `order_id` INTEGER, - `delivery_address_id` INTEGER, - `delivery_place_id` INTEGER, - `schedule_id` INTEGER NOT NULL, - `due_delivery_time_start` DATETIME NOT NULL, - `due_delivery_time_end` DATETIME NOT NULL, - PRIMARY KEY (`id`), - INDEX `fi_order_delivery_schedule_order_id` (`order_id`), - INDEX `fi_order_delivery_address_id` (`delivery_address_id`), - INDEX `fi_order_delivery_place_id` (`delivery_place_id`), - INDEX `fi_order_delivery_schedule_id` (`schedule_id`), - CONSTRAINT `fk_order_delivery_schedule_order_id` - FOREIGN KEY (`order_id`) - REFERENCES `order` (`id`), - CONSTRAINT `fk_order_delivery_address_id` - FOREIGN KEY (`delivery_address_id`) - REFERENCES `order_address` (`id`), - CONSTRAINT `fk_order_delivery_place_id` - FOREIGN KEY (`delivery_place_id`) - REFERENCES `pdr_places` (`id`), - CONSTRAINT `fk_order_delivery_schedule_id` - FOREIGN KEY (`schedule_id`) - REFERENCES `lps_area_schedule` (`id`) -) ENGINE=InnoDB; - -# This restores the fkey checks, after having unset them earlier -SET FOREIGN_KEY_CHECKS = 1; diff --git a/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php b/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php index 78d0c3f6..e961f0e1 100644 --- a/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php +++ b/local/modules/PlanificationLivraison/EventListeners/DeliveryListener.php @@ -6,6 +6,7 @@ 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; @@ -56,40 +57,41 @@ class DeliveryListener extends BaseAction implements EventSubscriberInterface if ($module == LivraisonParSecteurs::getModuleId()) { if (null !== $scheduleId = $request->get('lps-choosen-day', null)) { - $lpsData = new SessionData(); - $lpsData->setDeliveryAddressId($session->getOrder()->getChoosenDeliveryAddress()); - $lpsData->setAreaScheduleId($scheduleId); + $sessionData = new SessionData(); + $sessionData->setDeliveryAddressId($session->getOrder()->getChoosenDeliveryAddress()); + $sessionData->setScheduleId($scheduleId); // 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); + $chosenDate = PlanificationLivraison::calculateRelativeDate($schedule->getDay()); + $completeDay = PlanificationLivraison::getDayLabel($schedule->getDay()); + $completeDay .= " " . $chosenDate->format(PlanificationLivraison::FORMAT_DATES); - $lpsData->setDeliveryDate($completeDay); - $lpsData->setDeliveryStartTime($schedule->getBeginTime()); - $lpsData->setDeliveryEndTime($schedule->getEndTime()); + $sessionData->setDeliveryDate($completeDay); + $sessionData->setDeliveryStartTime($schedule->getBeginTime()); + $sessionData->setDeliveryEndTime($schedule->getEndTime()); - $session->set('lpsData', $lpsData); + $session->set('lpsData', $sessionData); } } 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()); + $sessionData = new SessionData(); + $sessionData->setScheduleId($scheduleId); + $schedule = PdrScheduleQuery::create()->findOneById($scheduleId); + $sessionData->setPlaceId($schedule->getIdPlace()); // 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()); + $chosenDate = PlanificationLivraison::calculateRelativeDate($schedule->getDay()); + $completeDay = PlanificationLivraison::getDayLabel($schedule->getDay()); + $completeDay .= " " . $chosenDate->format(PlanificationLivraison::FORMAT_DATES); + $sessionData->setDeliveryDate($completeDay); + $sessionData->setDeliveryStartTime($schedule->getBeginTime()); + $sessionData->setDeliveryEndTime($schedule->getEndTime()); + + $session->set('pdrData', $sessionData); } } } @@ -107,28 +109,41 @@ class DeliveryListener extends BaseAction implements EventSubscriberInterface $order = $event->getOrder(); $deliveryModuleId = $order->getDeliveryModuleId(); - if ($deliveryModuleId == LivraisonParSecteurs::getModuleId()) { + if ($deliveryModuleId == LivraisonParSecteurs::getModuleId() + || $deliveryModuleId == PointRetrait::getModuleId()) + { + if ($deliveryModuleId == LivraisonParSecteurs::getModuleId()) + $sessionData = $session->get('lpsData'); + else + $sessionData = $session->get('pdrData'); - $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(); + if ($sessionData === null) + throw new TheliaProcessException("PlanificationLivraison : Données de session vides : " . $event->getMessage()); $con = Propel::getConnection(); $con->beginTransaction(); $query = new OrderDeliverySchedule(); try { - $query->setOrderId($orderId); + $scheduleId = $sessionData->getScheduleId(); + + $query->setOrderId($order->getId()); $query->setScheduleId($scheduleId); - $query->setDeliveryAddressId($lpsData->getDeliveryAddressId()); - $schedule = LpsAreaScheduleQuery::create()->findOneById($scheduleId); - $chosenDate = LivraisonParSecteurs::calculateRelativeDate($schedule->getDay()); + if ($deliveryModuleId == LivraisonParSecteurs::getModuleId()) { + $query->setDeliveryAddressId($sessionData->getDeliveryAddressId()); + $query->setDeliveryPlaceId(null); - $format = LivraisonParSecteurs::FORMAT_DATE_COMPLETE; + $schedule = LpsAreaScheduleQuery::create()->findOneById($scheduleId); + } + else { + $query->setDeliveryPlaceId($sessionData->getPlaceId()); + $query->setDeliveryAddressId(null); + + $schedule = PdrScheduleQuery::create()->findOneById($scheduleId); + } + + $chosenDate = PlanificationLivraison::calculateRelativeDate($schedule->getDay()); + $format = PlanificationLivraison::FORMAT_DATE_COMPLETE; $startDate = DateTime::createFromFormat($format, $chosenDate->format('Y-m-d ') . $schedule->getBeginTime()->format('H:i:s')); $query->setDueDeliveryTimeStart($startDate); $endDate = DateTime::createFromFormat($format, $chosenDate->format('Y-m-d ') . $schedule->getEndTime()->format('H:i:s')); @@ -148,7 +163,7 @@ class DeliveryListener extends BaseAction implements EventSubscriberInterface { return [ TheliaEvents::ORDER_SET_DELIVERY_MODULE => ['recordCurrentDeliveryAddress', 64], - TheliaEvents::ORDER_BEFORE_PAYMENT => ['updateCurrentDeliveryAddress', 64] + TheliaEvents::ORDER_AFTER_CREATE => ['updateCurrentDeliveryAddress', 64] ]; } } diff --git a/local/modules/PlanificationLivraison/I18n/fr_FR.php b/local/modules/PlanificationLivraison/I18n/fr_FR.php index fd1e977d..42222b64 100644 --- a/local/modules/PlanificationLivraison/I18n/fr_FR.php +++ b/local/modules/PlanificationLivraison/I18n/fr_FR.php @@ -10,4 +10,12 @@ return array( 'Help for orange alert' => 'Si le délai entre la date du jour et la date de livraison/retrait prévue est inférieur à ce nombre de jours, la commande apparaitra comme URGENTE dans votre tableau de bord', 'Help for preparation delay' => 'Délai incompressible entre la commande client et la possibilité de livraison/retrait (achats des produits, préparation, ...)', 'Save' => 'Enregistrer', + 'Warning withdrawal date' => 'N\'oubliez pas de venir retirer votre commande le %date entre %heure_debut et %heure_fin', + 'Monday' => 'Lundi', + 'Tuesday' => 'Mardi', + 'Wednesday' => 'Mercredi', + 'Thursday' => 'Jeudi', + 'Friday' => 'Vendredi', + 'Saturday' => 'Samedi', + 'Sunday' => 'Dimanche', ); diff --git a/local/modules/PlanificationLivraison/Loop/ScheduledDeliveriesLoop.php b/local/modules/PlanificationLivraison/Loop/ScheduledDeliveriesLoop.php index 61afb467..8ebdd61e 100644 --- a/local/modules/PlanificationLivraison/Loop/ScheduledDeliveriesLoop.php +++ b/local/modules/PlanificationLivraison/Loop/ScheduledDeliveriesLoop.php @@ -58,6 +58,7 @@ class ScheduledDeliveriesLoop extends BaseLoop implements PropelSearchLoopInterf protected function getArgDefinitions() { return new ArgumentCollection( + Argument::createIntTypeArgument('order_id'), Argument::createEnumListTypeArgument('domicile_ou_retrait', [ self::DOMICILE, self::RETRAIT @@ -77,6 +78,12 @@ class ScheduledDeliveriesLoop extends BaseLoop implements PropelSearchLoopInterf { $deliveries = OrderDeliveryScheduleQuery::create(); + + if (null !== $this->getOrderId()) { + return $deliveries->filterByOrderId($this->getOrderId()); + } + + foreach ($this->getDomicileOuRetrait() as $parametre) { switch ($parametre) { case self::DOMICILE: diff --git a/local/modules/PlanificationLivraison/Model/SessionData.php b/local/modules/PlanificationLivraison/Model/SessionData.php index 4e084519..562fe59b 100644 --- a/local/modules/PlanificationLivraison/Model/SessionData.php +++ b/local/modules/PlanificationLivraison/Model/SessionData.php @@ -6,11 +6,44 @@ namespace PlanificationLivraison\Model; class SessionData { - protected $deliveryAddressId = null; - protected $areaScheduleId = null; + protected $scheduleId = null; protected $deliveryDate = null; protected $deliveryStartTime = null; protected $deliveryEndTime = null; + protected $deliveryAddressId = null; + protected $placeId = null; + + /** + * @return null + */ + public function getScheduleId() + { + return $this->scheduleId; + } + + /** + * @param null $scheduleId + */ + public function setScheduleId($scheduleId) + { + $this->scheduleId = $scheduleId; + } + + /** + * @return null + */ + public function getPlaceId() + { + return $this->placeId; + } + + /** + * @param null $placeId + */ + public function setPlaceId($placeId) + { + $this->placeId = $placeId; + } /** * @return null @@ -28,22 +61,6 @@ class SessionData $this->deliveryAddressId = $deliveryAddressId; } - /** - * @return null - */ - public function getAreaScheduleId() - { - return $this->areaScheduleId; - } - - /** - * @param null $areaScheduleId - */ - public function setAreaScheduleId($areaScheduleId) - { - $this->areaScheduleId = $areaScheduleId; - } - /** * @return null */ diff --git a/local/modules/PlanificationLivraison/PlanificationLivraison.php b/local/modules/PlanificationLivraison/PlanificationLivraison.php index eedb4d30..db5fcb6f 100644 --- a/local/modules/PlanificationLivraison/PlanificationLivraison.php +++ b/local/modules/PlanificationLivraison/PlanificationLivraison.php @@ -2,7 +2,9 @@ namespace PlanificationLivraison; +use DateInterval; use Propel\Runtime\Connection\ConnectionInterface; +use Thelia\Core\Translation\Translator; use Thelia\Install\Database; use Thelia\Module\BaseModule; @@ -18,6 +20,10 @@ class PlanificationLivraison extends BaseModule const CONFIG_ORANGE_ALERT = 'delay_orange_alert'; const CONFIG_PREPARATION_DELAY = 'orders_preparation_delay'; + const FORMAT_DATES = 'd/m/Y'; + const FORMAT_DATE_COMPLETE = 'Y-m-d H:i:s'; + + /** * @param ConnectionInterface|null $con */ @@ -27,4 +33,60 @@ class PlanificationLivraison extends BaseModule $database->insertSql(null, array(__DIR__ . '/Config/thelia.sql')); } + 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; + } + + + static public function getDayLabel($int) + { + $translator = Translator::getInstance(); + + $days = [ + $translator->trans("Monday", [], PlanificationLivraison::DOMAIN_NAME), + $translator->trans("Tuesday", [], PlanificationLivraison::DOMAIN_NAME), + $translator->trans("Wednesday", [], PlanificationLivraison::DOMAIN_NAME), + $translator->trans("Thursday", [], PlanificationLivraison::DOMAIN_NAME), + $translator->trans("Friday", [], PlanificationLivraison::DOMAIN_NAME), + $translator->trans("Saturday", [], PlanificationLivraison::DOMAIN_NAME), + $translator->trans("Sunday", [], PlanificationLivraison::DOMAIN_NAME) + ]; + + if ($int === null) + return $days; + else + return $days[$int]; + } + } diff --git a/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css b/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css new file mode 100644 index 00000000..99f6286f --- /dev/null +++ b/local/modules/PlanificationLivraison/templates/backOffice/default/assets/css/custom.css @@ -0,0 +1,6 @@ + +.mode-livraison { + font-weight: 900; + color: red; + font-size: 1.5rem; +} \ No newline at end of file diff --git a/local/modules/PointRetrait/Config/config.xml b/local/modules/PointRetrait/Config/config.xml index 683e956e..8a58a872 100644 --- a/local/modules/PointRetrait/Config/config.xml +++ b/local/modules/PointRetrait/Config/config.xml @@ -14,11 +14,18 @@ + + + + + + + diff --git a/local/modules/PointRetrait/Form/CreateScheduleForm.php b/local/modules/PointRetrait/Form/CreateScheduleForm.php index 35a578b0..97435388 100644 --- a/local/modules/PointRetrait/Form/CreateScheduleForm.php +++ b/local/modules/PointRetrait/Form/CreateScheduleForm.php @@ -2,6 +2,7 @@ namespace PointRetrait\Form; +use PlanificationLivraison\PlanificationLivraison; use PointRetrait\PointRetrait; use Thelia\Form\BaseForm; use Symfony\Component\Validator\Constraints; @@ -25,7 +26,7 @@ class CreateScheduleForm extends BaseForm "constraints" => [new Constraints\NotBlank()] ]) ->add("day", "choice", [ - "choices" => PointRetrait::getDayLabel(null), + "choices" => PlanificationLivraison::getDayLabel(null), "label" => $this->translator->trans("Withdrawal day", [], PointRetrait::MESSAGE_DOMAIN), "label_attr" => ["for" => "attr-place-schedule-day"], "required" => true, diff --git a/local/modules/PointRetrait/Form/UpdateScheduleForm.php b/local/modules/PointRetrait/Form/UpdateScheduleForm.php index eb9be74f..ef63f320 100644 --- a/local/modules/PointRetrait/Form/UpdateScheduleForm.php +++ b/local/modules/PointRetrait/Form/UpdateScheduleForm.php @@ -2,6 +2,7 @@ namespace PointRetrait\Form; +use PlanificationLivraison\PlanificationLivraison; use PointRetrait\PointRetrait; use Thelia\Form\BaseForm; use Symfony\Component\Validator\Constraints; @@ -31,7 +32,7 @@ class UpdateScheduleForm extends BaseForm "constraints" => [new Constraints\NotBlank()] ]) ->add("day", "choice", [ - "choices" => PointRetrait::getDayLabel(null), + "choices" => PlanificationLivraison::getDayLabel(null), "label" => $this->translator->trans("Withdrawal day", [], PointRetrait::MESSAGE_DOMAIN), "label_attr" => ["for" => "attr-place-schedule-day"], "required" => true, diff --git a/local/modules/PointRetrait/Form/ViewScheduleForm.php b/local/modules/PointRetrait/Form/ViewScheduleForm.php index 330934cc..5b26b10e 100644 --- a/local/modules/PointRetrait/Form/ViewScheduleForm.php +++ b/local/modules/PointRetrait/Form/ViewScheduleForm.php @@ -2,6 +2,7 @@ namespace PointRetrait\Form; +use PlanificationLivraison\PlanificationLivraison; use PointRetrait\PointRetrait; use Thelia\Form\BaseForm; use Symfony\Component\Validator\Constraints; @@ -25,7 +26,7 @@ class ViewScheduleForm extends BaseForm "constraints" => [new Constraints\NotBlank()] ]) ->add("day", "choice", [ - "choices" => PointRetrait::getDayLabel(null), + "choices" => PlanificationLivraison::getDayLabel(null), "label" => $this->translator->trans("Delivery day", [], PointRetrait::MESSAGE_DOMAIN), "label_attr" => ["for" => "attr-place-schedule-day"], "required" => true, diff --git a/local/modules/PointRetrait/Hook/AdminHook.php b/local/modules/PointRetrait/Hook/AdminHook.php index 4d887883..eede815b 100644 --- a/local/modules/PointRetrait/Hook/AdminHook.php +++ b/local/modules/PointRetrait/Hook/AdminHook.php @@ -51,4 +51,31 @@ class AdminHook extends BaseHook } } + /* Pour intégrer la date prévue de retrait dans différents formulaires (email, backOffice, ...) */ + public function displayDeliveryDate(HookRenderEvent $event) + { + + $moduleId = $event->getArgument('module'); + $orderId = $event->getArgument('order_id'); + + if ((null !== $orderId) && ($moduleId == PointRetrait::getModuleId())) + { + $sessionData = $this->getSession()->get('pdrData'); + $selectedDay = $sessionData->getDeliveryDate(); + $beginTime = $sessionData->getDeliveryStartTime(); + $endTime = $sessionData->getDeliveryEndTime(); + + if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) + { + $event->add( + $this->render( + 'delivery-address.html', [ + 'day' => $selectedDay, + 'begin_time' => $beginTime, + 'end_time' => $endTime + ]) + ); + } + } + } } diff --git a/local/modules/PointRetrait/Hook/EmailHook.php b/local/modules/PointRetrait/Hook/EmailHook.php new file mode 100644 index 00000000..e01f6726 --- /dev/null +++ b/local/modules/PointRetrait/Hook/EmailHook.php @@ -0,0 +1,83 @@ +getArgument('module'); + $orderId = $event->getArgument('order'); + + if ((null !== $orderId) && ($moduleId == PointRetrait::getModuleId())) + { + $sessionData = $this->getSession()->get('pdrData'); + $selectedDay = $sessionData->getDeliveryDate(); + $beginTime = $sessionData->getDeliveryStartTime(); + $endTime = $sessionData->getDeliveryEndTime(); + + if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) + { + $event->add( + $this->render( + 'delivery-address.html', [ + 'day' => $selectedDay, + 'begin_time' => $beginTime, + 'end_time' => $endTime + ]) + ); + } + else + throw new TheliaProcessException("PointRetrait : Impossible de récupérer les données de session SessionData"); + } + } + + + public function displayCompleteInformationWithinEmail(HookRenderEvent $event) + { + + $orderId = $event->getArgument('order'); + $moduleId = OrderQuery::create()->findOneById($orderId)->getDeliveryModuleId(); + + if ((null !== $orderId) && ($moduleId == PointRetrait::getModuleId())) + { + $sessionData = $this->getSession()->get('pdrData'); + $selectedDay = $sessionData->getDeliveryDate(); + $beginTime = $sessionData->getDeliveryStartTime(); + $endTime = $sessionData->getDeliveryEndTime(); + + if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) + { + $place = PdrPlacesQuery::create()->findOneById($sessionData->getPlaceId()); + + $event->add( + $this->render( + 'delivery-address-full.html', [ + 'day' => $selectedDay, + 'begin_time' => $beginTime, + 'end_time' => $endTime, + 'placeName' => $place->getTitle(), + 'address1' => $place->getAddress1() . ' ' . $place->getAddress2(), + 'zipcode' => $place->getZipcode(), + 'city' => $place->getCity() + ]) + ); + } + else + throw new TheliaProcessException("PointRetrait : Impossible de récupérer les données de session SessionData"); + } + } + +} + + diff --git a/local/modules/PointRetrait/Hook/FrontHook.php b/local/modules/PointRetrait/Hook/FrontHook.php index e6c2f454..c71cbc51 100644 --- a/local/modules/PointRetrait/Hook/FrontHook.php +++ b/local/modules/PointRetrait/Hook/FrontHook.php @@ -2,9 +2,11 @@ namespace PointRetrait\Hook; +use PlanificationLivraison\Model\SessionData; use PointRetrait\PointRetrait; use Thelia\Core\Event\Hook\HookRenderEvent; use Thelia\Core\Hook\BaseHook; +use Thelia\Exception\TheliaProcessException; class FrontHook extends BaseHook { @@ -21,6 +23,34 @@ class FrontHook extends BaseHook ); } + + public function displayWithdrawalDate(HookRenderEvent $event) + { + $order = $this->getSession()->getOrder(); + if ((null !== $order) && $order->getDeliveryModuleId() == PointRetrait::getModuleId()) + { + $sessionData = $this->getSession()->get('pdrData'); + $selectedDay = $sessionData->getDeliveryDate(); + $beginTime = $sessionData->getDeliveryStartTime(); + $endTime = $sessionData->getDeliveryEndTime(); + + if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) ) + { + $event->add( + $this->render( + 'delivery-address.html', [ + 'day' => $selectedDay, + 'begin_time' => $beginTime, + 'end_time' => $endTime, + 'place_id' => $sessionData->getPlaceId() + ]) + ); + } + else + throw new TheliaProcessException("PointRetrait : Impossible de récupérer les données de session sessionData : "); + } + } + } diff --git a/local/modules/PointRetrait/I18n/fr_FR.php b/local/modules/PointRetrait/I18n/fr_FR.php index 2887d25d..8f6387fd 100644 --- a/local/modules/PointRetrait/I18n/fr_FR.php +++ b/local/modules/PointRetrait/I18n/fr_FR.php @@ -26,6 +26,7 @@ return array( 'Module name' => 'Point de Retrait AuxBieauxLegumes', 'My places' => 'Point de retrait AuxBieauxLegumes', 'My withdrawal places' => 'Mes points de retrait AuxBieauxLegumes', + 'Order to withdraw' => 'Commande à retirer au point retrait suivant', 'Order number' => 'N° de commande', 'Place name' => 'Nom du point de retrait', 'Please select a delivery place' => 'Veuillez sélectionner un point de retrait', @@ -37,18 +38,13 @@ return array( 'Title of config view' => 'Point retrait AuxBieauxLegumes - Configuration', 'There is no order to withdraw' => 'Aucune commande à retirer en Point Retrait', 'There is no schedule for this place' => 'Aucun créneau de retrait sur ce point de retrait', + 'When to get your order' => 'Quand pouvez-vous retirer votre commande ?', + 'Where to get your order' => 'Où pouvez-vous la récupérer ?', 'Withdrawal beginning time' => 'Début du retrait', 'Withdrawal day' => 'Jour de retrait', 'Withdrawal days' => 'Jours de retrait', 'Withdrawal ending time' => 'Fin du retrait', 'Withdrawal price' => 'Coût du retrait', 'Zipcode' => 'Code postal', - 'Monday' => 'Lundi', - 'Tuesday' => 'Mardi', - 'Wednesday' => 'Mercredi', - 'Thursday' => 'Jeudi', - 'Friday' => 'Vendredi', - 'Saturday' => 'Samedi', - 'Sunday' => 'Dimanche', '' => '', ); diff --git a/local/modules/PointRetrait/Loop/GeneralLoop.php b/local/modules/PointRetrait/Loop/GeneralLoop.php index 58c665f9..296aa662 100644 --- a/local/modules/PointRetrait/Loop/GeneralLoop.php +++ b/local/modules/PointRetrait/Loop/GeneralLoop.php @@ -2,6 +2,7 @@ namespace PointRetrait\Loop; +use PlanificationLivraison\PlanificationLivraison; use PointRetrait\Model\PdrPlacesQuery; use PointRetrait\Model\PdrScheduleQuery; use PointRetrait\PointRetrait; @@ -39,7 +40,7 @@ class GeneralLoop extends BaseLoop implements PropelSearchLoopInterface ->orderByDay(); $deliveryDays = ""; foreach ($schedule as $day) { - $deliveryDays .= PointRetrait::getDayLabel($day->getDay()) . ', '; + $deliveryDays .= PlanificationLivraison::getDayLabel($day->getDay()) . ', '; } $deliveryDays = substr($deliveryDays, 0, strlen($deliveryDays)-2); diff --git a/local/modules/PointRetrait/Loop/ScheduleLoop.php b/local/modules/PointRetrait/Loop/ScheduleLoop.php index 8d7134d0..867f7525 100644 --- a/local/modules/PointRetrait/Loop/ScheduleLoop.php +++ b/local/modules/PointRetrait/Loop/ScheduleLoop.php @@ -2,6 +2,7 @@ namespace PointRetrait\Loop; +use PlanificationLivraison\PlanificationLivraison; use PointRetrait\Model\PdrScheduleQuery; use PointRetrait\PointRetrait; use Thelia\Core\Template\Element\BaseLoop; @@ -37,10 +38,10 @@ class ScheduleLoop extends BaseLoop implements PropelSearchLoopInterface ->set("ID", $pdr_schedule->getId()) ->set("PLACE_ID", $pdr_schedule->getIdPlace()) ->set("DAY", $pdr_schedule->getDay()) - ->set("DAY_LABEL", PointRetrait::getDayLabel($pdr_schedule->getDay())) + ->set("DAY_LABEL", PlanificationLivraison::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)) + ->set("CALCULATED_DAY", PlanificationLivraison::calculateRelativeDate($pdr_schedule->getDay())->format(PlanificationLivraison::FORMAT_DATES)) ; $loopResult->addRow($loopResultRow); } diff --git a/local/modules/PointRetrait/PointRetrait.php b/local/modules/PointRetrait/PointRetrait.php index 5c35157d..2a011ef7 100644 --- a/local/modules/PointRetrait/PointRetrait.php +++ b/local/modules/PointRetrait/PointRetrait.php @@ -2,19 +2,15 @@ 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; use Thelia\Install\Database; -use Thelia\Model\AddressQuery; use Thelia\Model\Country; use Thelia\Model\OrderPostage; use Thelia\Module\AbstractDeliveryModule; use Thelia\Module\Exception\DeliveryException; -use DateInterval; @@ -24,13 +20,6 @@ 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'; - /** @@ -86,59 +75,4 @@ class PointRetrait extends AbstractDeliveryModule } - static public function getDayLabel($int) - { - $translator = Translator::getInstance(); - - $days = [ - $translator->trans("Monday", [], PointRetrait::MESSAGE_DOMAIN), - $translator->trans("Tuesday", [], PointRetrait::MESSAGE_DOMAIN), - $translator->trans("Wednesday", [], PointRetrait::MESSAGE_DOMAIN), - $translator->trans("Thursday", [], PointRetrait::MESSAGE_DOMAIN), - $translator->trans("Friday", [], PointRetrait::MESSAGE_DOMAIN), - $translator->trans("Saturday", [], PointRetrait::MESSAGE_DOMAIN), - $translator->trans("Sunday", [], PointRetrait::MESSAGE_DOMAIN) - ]; - - if ($int === null) - return $days; - else - 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/backOffice/default/assets/css/styles.css b/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css index 3c10fc5e..339d5280 100644 --- a/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css +++ b/local/modules/PointRetrait/templates/backOffice/default/assets/css/styles.css @@ -63,4 +63,9 @@ .pin-pdr { height: 25px; margin-left: 12px; +} + +.titre { + font-weight: 900; + color: red; } \ No newline at end of file diff --git a/local/modules/PointRetrait/templates/backOffice/default/delivery-address.html b/local/modules/PointRetrait/templates/backOffice/default/delivery-address.html new file mode 100644 index 00000000..c51430de --- /dev/null +++ b/local/modules/PointRetrait/templates/backOffice/default/delivery-address.html @@ -0,0 +1,8 @@ +  + + + {intl l="Scheduled date" d="pointretrait"} + {$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"} + + +  diff --git a/local/modules/PointRetrait/templates/email/default/delivery-address-full.html b/local/modules/PointRetrait/templates/email/default/delivery-address-full.html new file mode 100644 index 00000000..e87bdb65 --- /dev/null +++ b/local/modules/PointRetrait/templates/email/default/delivery-address-full.html @@ -0,0 +1,18 @@ +
+
{intl l="Scheduled date" d="pointretrait"}
+
+ {$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"} +
+
+ +
+
{intl l="Place name" d="pointretrait"}
+
+ {format_address organization="{$placeName}" + address_line1="{$address1}" + postal_code="{$zipcode}" + locality="{$city}" + locale=$locale} + +
+
diff --git a/local/modules/PointRetrait/templates/email/default/delivery-address.html b/local/modules/PointRetrait/templates/email/default/delivery-address.html new file mode 100644 index 00000000..2c013fed --- /dev/null +++ b/local/modules/PointRetrait/templates/email/default/delivery-address.html @@ -0,0 +1,6 @@ +
+
{intl l="Scheduled date" d="pointretrait"}
+
+ {$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"} +
+
diff --git a/local/modules/PointRetrait/templates/frontOffice/default/delivery-address.html b/local/modules/PointRetrait/templates/frontOffice/default/delivery-address.html new file mode 100644 index 00000000..6b192518 --- /dev/null +++ b/local/modules/PointRetrait/templates/frontOffice/default/delivery-address.html @@ -0,0 +1,24 @@ +{strip} + +
+ {loop type="pdr_places" name="place-loop" id={$place_id}} +
{intl l="Order to withdraw" d="pointretrait"}
+
+ {$TITLE} +
+ {$ADDRESS1}
+ {if $ADDRESS2 != ""} + {$ADDRESS2}
+ {/if} + {$ZIPCODE} {$CITY} +
+
+ {/loop} + +
{intl l="Scheduled date" d="pointretrait"}
+
+ {$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"} +
+
+ +{/strip} diff --git a/templates/backOffice/custom/order-edit.html b/templates/backOffice/custom/order-edit.html index 844c9073..5b00d6ca 100644 --- a/templates/backOffice/custom/order-edit.html +++ b/templates/backOffice/custom/order-edit.html @@ -32,6 +32,12 @@ {ifloop rel='the-order'} + {loop type="scheduled_deliveries" name="order-schedule-loop" order_id=$order_id} + {assign var="planifDebut" value=$START_DATE} + {assign var="planifFin" value=$END_DATE} + {assign var="planifPlaceId" value=$PLACE_ID} + {/loop} + {loop type="order" name="the-order" id=$order_id customer="*" with_prev_next_info="true" backend_context="1"} {loop type="currency" name="order-currency" id=$CURRENCY} @@ -44,7 +50,14 @@

{intl l='Order placed on %order_date at %order_time' order_date={format_date date=$CREATE_DATE output='date'} order_time={format_date date=$CREATE_DATE output='time'}}

-
+
+ {loop name="delivery-module-loop" type="module" id=$DELIVERY_MODULE} +

{$CODE}

+

{format_date date=$planifDebut output='date' format="d/m"} entre {format_date date=$planifDebut output='time' format="H\hi"} et {format_date date=$planifFin output='time' format="H\hi"}

+ {/loop} +
+ +
@@ -416,6 +429,17 @@
{$DESCRIPTION nofilter}
{/if} {/loop} + + {if $planifPlaceId neq ''} + {loop type="pdr_places" name="places-loop" id=$planifPlaceId} +

{$TITLE}

+

{$ADDRESS1}

+ {if $ADDRESS2 neq ''} +

{$ADDRESS1}

+ {/if} +

{$ZIPCODE} {$CITY}

+ {/loop} + {/if}
{hook name="order-edit.delivery-module-bottom" order_id=$order_id module_id=$DELIVERY_MODULE} @@ -627,75 +651,78 @@ - {loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {ifhook rel="order-edit.bill-delivery-address"} + {ifhook rel="order-edit.bill-delivery-address"} + {* delivery module can customize the delivery address *} {hook name="order-edit.bill-delivery-address" module="$DELIVERY_MODULE" order_id={$order_id}} - {/ifhook} - {/loop} + {/ifhook} + {elsehook rel="order-edit.bill-delivery-address"} + {loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/loop} + {/elsehook}
 
 
{intl l="Company"}{$COMPANY}
{intl l="Title"}{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}
{intl l="Firstname"}{$FIRSTNAME}
{intl l="Lastname"}{$LASTNAME}
{intl l="Street address"}{$ADDRESS1}
{intl l="Additional address"}{$ADDRESS2}
{intl l="Additional address"}{$ADDRESS3}
{intl l="Zip code"}{$ZIPCODE}
{intl l="City"}{$CITY}
{intl l="Country"}{loop type="country" name="order-delivery-address-country" id=$COUNTRY visible="*"}{$TITLE}{/loop}
{intl l="State"} - {if $STATE} - {loop type="state" name="order-delivery-address-state" id=$STATE visible="*"}{$TITLE}{/loop} - {else} - - - {/if} -
{intl l="Phone"}{$PHONE}
{intl l="Cellphone"}{$CELLPHONE}
 
 
{intl l="Company"}{$COMPANY}
{intl l="Title"}{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}
{intl l="Firstname"}{$FIRSTNAME}
{intl l="Lastname"}{$LASTNAME}
{intl l="Street address"}{$ADDRESS1}
{intl l="Additional address"}{$ADDRESS2}
{intl l="Additional address"}{$ADDRESS3}
{intl l="Zip code"}{$ZIPCODE}
{intl l="City"}{$CITY}
{intl l="Country"}{loop type="country" name="order-delivery-address-country" id=$COUNTRY visible="*"}{$TITLE}{/loop}
{intl l="State"} + {if $STATE} + {loop type="state" name="order-delivery-address-state" id=$STATE visible="*"}{$TITLE}{/loop} + {else} + - + {/if} +
{intl l="Phone"}{$PHONE}
{intl l="Cellphone"}{$CELLPHONE}
diff --git a/templates/email/custom/email-layout.tpl b/templates/email/custom/email-layout.tpl index 46a4317c..5c203382 100644 --- a/templates/email/custom/email-layout.tpl +++ b/templates/email/custom/email-layout.tpl @@ -32,7 +32,7 @@ body{ margin:0; padding:0; -} +}ORDER_SET_DELIVERY_ADDRESS img{ border:0; height:auto; diff --git a/templates/email/custom/order_confirmation.html b/templates/email/custom/order_confirmation.html index a47dfcc0..4eb078b4 100644 --- a/templates/email/custom/order_confirmation.html +++ b/templates/email/custom/order_confirmation.html @@ -1,3 +1,10 @@ + + {extends file="email-layout.tpl"} {* Do not provide a "Open in browser" link *} @@ -22,6 +29,12 @@ {assign var="customerRef" value=$REF} {/loop} + {loop type="scheduled_deliveries" name="order-schedule-loop" order_id=$order_id} + {assign var="planifDebut" value=$START_DATE} + {assign var="planifFin" value=$END_DATE} + {assign var="planifPlaceId" value=$PLACE_ID} + {/loop} + {hook name="email-html.order-confirmation.before-address" order=$order_id} {intl l="Here are the details of your purchase:"}

@@ -29,12 +42,25 @@
+ {if $planifPlaceId neq ''} + {intl l="Order to withdraw" d="pointretrait"}
+ {loop type="pdr_places" name="places-loop" id=$planifPlaceId} +

{$TITLE}
+ {$ADDRESS1} + {if $ADDRESS2 neq ''} + {$ADDRESS2} + {/if} +

+

{$ZIPCODE} {$CITY}

+ {/loop} + {else} {intl l="Delivery address:"}
{format_address order_address=$DELIVERY_ADDRESS locale=$locale} {ifhook rel="email-html.order-confirmation.delivery-address"} - {hook name="email-html.order-confirmation.delivery-address" module={$DELIVERY_MODULE} order=$order_id} + {hook name="email-html.order-confirmation.delivery-address" module={$DELIVERY_MODULE} order=$order_id} {/ifhook} + {/if}
{intl l="Billing address:"}
@@ -43,6 +69,16 @@
+ {if $planifPlaceId neq ''} + + {intl l="Warning withdrawal date" d="planificationlivraison" + date={format_date date=$planifDebut output="date" format="d/m/Y"} + heure_debut={format_date date=$planifDebut output="time" format="H\hi"} + heure_fin={format_date date=$planifFin output="time" format="H\hi"} + } + + {/if} + {hook name="email-html.order-confirmation.after-address" order=$order_id}
diff --git a/templates/frontOffice/custom/I18n/fr_FR.php b/templates/frontOffice/custom/I18n/fr_FR.php index d26cd6a6..a3692362 100644 --- a/templates/frontOffice/custom/I18n/fr_FR.php +++ b/templates/frontOffice/custom/I18n/fr_FR.php @@ -1,146 +1,56 @@ '%nb élément', - '%nb Items' => '%nb éléments', '+' => '+', - '404' => '404', - 'Sorry! We are not able to give you a delivery method for your order.' => 'Désolé !Nous ne pouvons pas trouver de mode de livraison pour votre commande.', - 'A new password has been sent to your e-mail address. Please check your mailbox.' => 'Un nouveau mot de passe vient d\'être envoyé à votre adresse e-mail. Merci de vérifier votre boite de réception.', - 'A problem occured' => 'Un problème est survenu', - 'A summary of your order has been sent to the following address' => 'Un récapitulatif de commande vous a été envoyé par e-mail à l\'adresse suivante', - 'Account' => 'Mon compte', 'Add a new address' => 'Ajouter une nouvelle adresse', - 'Add to cart' => 'Ajouter au panier', - 'Additional Info' => 'Informations complémentaires', - 'Address' => 'Adresse', 'Address %nb' => 'Adresse n°', - 'Address Update' => 'Mise à jour de l\'adresse', - 'All' => 'Tout', 'All brands' => 'Toutes les marques', - 'All brands in %store' => 'Toutes les marques %store', 'All contents' => 'Tous les contenus', - 'All contents in' => 'tous les contenus de', - 'All product in brand %title' => 'Tous les produits de la marque %title', 'All products' => 'Tous les produits', - 'All products for brand %title in %store' => 'Tous les produits %title de %store', - 'All products in' => 'Tous les produits de', - 'Amount' => 'Montant', - 'An error occurred' => 'Une erreur est survenue', - 'Availability' => 'Disponibilité', 'Available' => 'Disponible', 'Back' => 'Retour', - 'Billing' => 'Facturation', - 'Billing Mode' => 'Mode de facturation', 'Billing address' => 'Adresse de facturation', 'Billing and delivery' => 'Facturation et livraison', - 'Brand information' => 'Marque', - 'Brands' => 'Marques', - 'Cancel' => 'Annuler', - 'Cancel Newsletter Subscription' => 'Annuler l\'abonnement à la Newsletter', 'Cart' => 'Panier', 'Cart total excl. taxes' => 'Total articles HT', 'Cart total incl. taxes' => 'Total articles TTC', - 'Categories' => 'Rubriques', - 'Change Password' => 'Modifier mon mot de passe', 'Change address' => 'Changer d\'adresse', - 'Change my account information' => 'Modifier mes informations personnelles', - 'Change my password' => 'Changer mon mot de passe', 'Check my order' => 'Vérifier ma commande', 'Choose your delivery address' => 'Choisissez une adresse de livraison', 'Choose your delivery method' => 'Choisissez votre moyen de livraison', 'Choose your payment method' => 'Choisissez votre moyen de paiement', 'Code :' => 'Code :', - 'Connecting to the secure payment server, please wait a few seconds...' => 'Connexion au serveur sécurisé, merci de patienter quelques secondes.', 'Contact Us' => 'Contactez-nous', - 'Contact page' => 'Page contact', 'Continue Shopping' => 'Continuer mes achats', 'Copyright' => 'Copyright', 'Coupon code' => 'Code promo', - 'Create' => 'Créer', 'Create New Account' => 'Créer un nouveau compte', - 'Create New Address' => 'Créer une nouvelle adresse', - 'Created' => 'Créée le', - 'Currency' => 'Devise', - 'Customer Number' => 'Numéro de client', - 'Date' => 'Date', 'Delete' => 'Supprimer', - 'Delivery' => 'Bon de livraison', 'Delivery Information' => 'Information de livraison', - 'Delivery Mode' => 'Mode de livraison', - 'Delivery REF' => 'Référence livraison', 'Delivery address' => 'Adresse de livraison', - 'Demo product description' => 'Descrption produit de démo', - 'Demo product title' => 'Titre produit de démo', - 'Description' => 'Description', 'Discount incl. taxes' => 'Remise TTC', - 'Discount with tax' => 'Remise TTC', - 'Do you have an account?' => 'Avez-vous un compte ?', 'Do you really want to delete this address ?' => 'Voulez-vous vraiment supprimer cette adresse ?', - 'Documents' => 'Documents', - 'Download' => 'Télécharger', 'Edit' => 'Modifier', 'Edit this address' => 'Editer cette adresse', 'Estimated shipping ' => 'Estimation des frais de port', - 'Expected delivery date: %delivery_date' => 'Date de livraison estimée :', - 'Forgot your Password?' => 'Mot de passe oublié ?', 'Free shipping' => 'Livraison gratuite', - 'From %price' => 'A partir de %price', - 'Go back to the previous page' => 'Retour à la page précédente', - 'Go home' => 'Retour à l\'accueil', - 'Grid' => 'Grille', - 'Home' => 'Accueil', 'I\'ve read and agreed on Terms & Conditions' => 'J\'ai lu et j\'accepte les conditions générales de vente', - 'If nothing happens within 10 seconds, please click here.' => 'Si rien ne se passe dans les 10 secondes, merci de cliquer ici. ', - 'If you want to change your email, please contact us.' => 'Pour changer votre email, merci de nous contacter', 'In Stock' => 'Disponible', 'Including %tax tax' => 'Dont taxes %tax', - 'Invoice REF' => 'Numéro de facture', - 'Invoice date' => 'Date de facturation', - 'Language' => 'Langue', - 'Latest' => 'Nouveautés', - 'Latest products' => 'Derniers produits', - 'List' => 'Liste', - 'List of orders' => 'Liste de mes commandes', - 'Login' => 'Connexion', 'Login Information' => 'Informations de connexion', 'Main Address' => 'Adresse Principale', - 'More information about this brand' => 'Plus de détails sur cette marque', 'Multi-payment platform' => 'Plateforme de paiement multiple', - 'My Account' => 'Mon compte', - 'My Address Books' => 'Mes carnets d\'adresses', - 'My Address book' => 'Mon carnet d\'adresses', - 'My Orders' => 'Mes commandes', 'My order' => 'Ma commande', 'Name' => 'Nom', - 'Name ascending' => 'Nom croissant', - 'Name descending' => 'Nom décroissant', 'Need help ?' => 'Besoin d\'aide ?', - 'Newsletter' => 'Lettre d\'information', - 'Newsletter Subscription' => 'Inscription à la newsletter', - 'Next' => 'Suivant', 'Next Step' => 'Etape suivante', - 'Next product' => 'Produit suivant.', - 'No Contents in this folder.' => 'Aucun contenu pour ce dossier.', 'No deliveries available for this cart and this country' => 'Aucun mode de livraison disponible pour ce panier et ce pays', - 'No products available in this brand' => 'Aucun produit de cette marque n\'est disponible', - 'No products available in this category' => 'Aucun produit dans cette catégorie.', - 'No results found' => 'Aucun résultat', 'No.' => 'N°', 'Ok' => 'Ok', - 'Options' => 'Options', - 'Order details' => 'Détail de la commande', - 'Order details %ref' => 'Détail de la commande %ref', - 'Order number' => 'Commande numéro', 'Orders over $50' => 'Commande supérieure à 50€', 'Out of Stock' => 'Hors stock', - 'PDF invoice' => 'Facture PDF', - 'Pagination' => 'Pagination', - 'Password' => 'Mot de passe', - 'Password Forgotten' => 'Mot de passe oublié', 'Pay with %module_title' => 'Payer avec %module_title ', 'Personal Information' => 'Informations personnelles', - 'Placeholder address label' => 'Maison, Domicile, Travail...', 'Placeholder address1' => 'Adresse', 'Placeholder address2' => 'Adresse', 'Placeholder cellphone' => 'Numéro de portable', @@ -156,118 +66,48 @@ return array( 'Placeholder lastname' => 'Nom de famille', 'Placeholder phone' => 'Numéro de téléphone', 'Placeholder zipcode' => 'Code postal', - 'Please enter your email address below.' => 'Veuillez saisir votre adresse e-mail ci-dessous.', - 'Please try again to order' => 'Merci de réessayer', - 'Position' => 'Position', - 'Postage' => 'Frais de livraison TTC', - 'Previous' => 'Précédent', - 'Previous product' => 'Produit précédent.', 'Price' => 'Prix', - 'Price ascending' => 'Prix croissant', - 'Price descending' => 'Prix décroissant', 'Proceed checkout' => 'Continuer la commande', - 'Product Empty Button' => 'Bouton produit vide', - 'Product Empty Message' => 'Message produit vide', - 'Product Empty Title' => 'Titre produit vide', 'Product Name' => 'Nom du produit', - 'Product Offers' => 'Offre spéciale', 'Qty' => 'Qté', 'Quantity' => 'Quantité', 'Questions ? See our F.A.Q.' => 'Questions ? Voir notre FAQ', - 'REF' => 'REF', - 'Rating' => 'Avis', - 'Redirect to bank service' => 'Redirection vers le service bancaire', - 'Ref.' => 'Réf.', 'Register' => 'S\'inscrire', - 'Regular Price:' => 'Prix normal', - 'Related' => 'Liés', 'Remove' => 'Supprimer', 'Remove this address' => 'Supprimer cette adresse', - 'SELECT YOUR CURRENCY' => 'Sélectionnez votre devise', - 'SELECT YOUR LANGUAGE' => 'Sélectionnez votre langue', - 'Sale was not found' => 'La promotion n\'a pas été trouvée', - 'Save %amount%sign on these products' => 'Economisez %amount%sign sur ces produits', - 'Save %amount%sign on this product' => 'Economisez %amount%sign sur ce produit', - 'Search' => 'Recherche', - 'Search Result for' => 'Résultat de recherche pour', 'Secondary Navigation' => 'Navigation secondaire', - 'Secure Payment' => 'Paiement sécurisé', 'Secure payment' => 'Paiement sécurisé', 'Select Country' => 'Choisissez un pays', 'Select State' => 'Sélectionnez un Etat', 'Select Title' => 'Civilité', 'Select your country:' => 'Sélectionnez votre pays :', 'Send' => 'Envoyer', - 'Send new password again' => 'Renvoyer un mot de passe', 'Send us a message' => 'Envoyez nous un message.', - 'Shipping' => 'Frais de livraison TTC', - 'Show' => 'Voir', - 'Sign in' => 'Se connecter', + 'Shipping' => 'Frais de livraison ou de retrait TTC', 'Skip to content' => 'Aller au contenu', - 'Sorry but this combination does not exist.' => 'Désolé, cette déclinaison n\'existe pas.', - 'Sorry, your cart is empty. There\'s nothing to pay.' => 'Désolé, votre panier est vide. Il n\'y a rien à payer.', - 'Sort By' => 'Trier par', - 'Special Price:' => 'Prix promo', - 'Status' => 'Etat', - 'Subscribe' => 'Inscription', - 'Tax %name: %tax' => 'Dont %name: %tax', 'Tax: %tax' => 'Dont taxe %tax', 'Taxed Price' => 'Prix TTC', 'Taxes total' => 'Total des taxes', - 'Thank you for the trust you place in us.' => 'Merci pour votre confiance. ', - 'Thanks !' => 'Merci !', - 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Merci de votre inscription ! Nous vous tiendrons informé dès qu\'il y aura des nouveautés.', - 'Thanks for your message, we will contact as soon as possible.' => 'Merci de votre message, nous vous contacterons dès que possible.', - 'The page cannot be found' => 'La page ne peut pas être trouvée', - 'The product has been added to your cart' => 'Le produit a été ajouté à votre panier', 'Thelia V2' => 'Thelia v2', - 'This offer is valid until %date' => 'Cette offre est valide jusqu\'au %date', - 'To cancel your subscription to our newsletter, please enter your email address below.' => 'Pour annuler votre abonnement à notre newsletter, veuillez entrer votre adresse email ci-dessous.', 'Toggle navigation' => 'Basculer la navigation', 'Total' => 'Total', 'Total incl. tax' => 'Total TTC', 'Total incl. taxes' => 'Total TTC', - 'Total incl.tax' => 'Total HT', - 'Total with tax' => 'Total TTC', - 'Total without tax' => 'Total HT', 'Total incl. taxes without postage' => 'Total TTC hors livraison', - 'Transaction REF : %ref' => 'Référence transaction', - 'Try again' => 'Ré-essayer le paiement', + 'Total incl.tax' => 'Total HT', 'Unit Price' => 'Prix unitaire', 'Unit Price incl. taxes' => 'Prix unitaire TTC', 'Unit Taxed Price' => 'Prix unitaire TTC', - 'Unsubscribe' => 'Me désabonner', - 'Update' => 'Mettre à jour', - 'Update Profile' => 'Mettre à jour votre profil', 'Update Quantity' => 'Mettre à jour la quantité', 'Upsell Products' => 'Produits liés', - 'View' => 'Voir', - 'View Cart' => 'Voir le panier', - 'View all' => ' Voir tout', - 'View as' => 'Voir en tant que', - 'View order %ref details' => 'Voir le détail de la commande %ref', - 'View product' => 'Voir le produit', 'Warning' => 'Attention', 'We apologize but some of the ordered products are not available any more.' => 'Nous sommes désolés, certains des produits que vous avez commandé ne sont plus disponibles.', - 'We\'re sorry but an error occured. Please try to contact the site administrator' => 'Nous sommes désolés mais une erreur est survenue. Veuillez contacter l\'administrateur', - 'We\'re sorry, a problem occured and your payment was not successful.' => 'Nous sommes désolés, un problème est survenu lors du paiement.', - 'You are here:' => 'Vous êtes ici :', - 'You choose' => 'Vous avez choisi ', - 'You choose to pay by' => 'Vous avez choisi de payer par', - 'You don\'t have orders yet.' => 'Vous n\'avez pas encore de commande.', 'You have no items in your shopping cart.' => 'Vous n\'avez pas de produit dans votre panier.', 'You may have a coupon ?' => 'Avez-vous un code promo ?', - 'You want to subscribe to the newsletter? Please enter your email address below.' => 'Vous voulez vous inscrire à la newsletter ? Veuillez saisir votre adresse e-mail ci-dessous.', - 'You will receive a link to reset your password.' => 'Vous recevrez un lien pour réinitialiser votre mot de passe.', 'Your Cart' => 'Votre panier', - 'Your customer account was successfully activated, you can now login.' => 'Votre compte client a bien été activé, vous pouvez maintenant vous connecter.', - 'Your order payment' => 'Votre paiement', - 'Your order will be confirmed by us upon receipt of your payment.' => 'Votre commande sera confirmée à réception de votre paiement.', - 'Your subscription to our newsletter has been canceled.' => 'Votre inscription à notre newsletter a été annulée.', 'for' => 'pour', 'instead of' => 'au lieu de', 'missing or invalid data' => 'Information erronée ou incomplète', - 'per page' => 'par page', 'update' => 'mettre à jour', 'with:' => 'avec :', ); diff --git a/templates/frontOffice/custom/order-delivery.html b/templates/frontOffice/custom/order-delivery.html index 260b9d31..1fee506d 100644 --- a/templates/frontOffice/custom/order-delivery.html +++ b/templates/frontOffice/custom/order-delivery.html @@ -1,3 +1,5 @@ + + {extends file="layout.tpl"} {* Security *} diff --git a/templates/frontOffice/custom/order-invoice.html b/templates/frontOffice/custom/order-invoice.html index 07f66cf5..c8c2a51a 100644 --- a/templates/frontOffice/custom/order-invoice.html +++ b/templates/frontOffice/custom/order-invoice.html @@ -271,6 +271,7 @@ {ifhook rel="order-invoice.delivery-address"} {* delivery module can customize the delivery address *} {hook name="order-invoice.delivery-address" modulecode="LivraisonParSecteurs"} + {hook name="order-invoice.delivery-address" modulecode="PointRetrait"} {/ifhook} {elsehook rel="order-invoice.delivery-address"}