PlanificationLivraison : on avance sur les templates d'email
This commit is contained in:
@@ -20,20 +20,24 @@
|
||||
</loops>
|
||||
|
||||
<hooks>
|
||||
|
||||
<hook id="lps.admin.hook" class="LivraisonParSecteurs\Hook\AdminHook">
|
||||
<tag name="hook.event_listener" event="main.in-top-menu-items" type="back" method="onMainTopMenuTools" />
|
||||
<tag name="hook.event_listener" event="order-edit.bill-delivery-address" type="back" method="displayDeliveryDate" />
|
||||
<tag name="hook.event_listener" event="home.block" type="back" method="displayScheduledDeliveries" />
|
||||
<argument type="service" id="thelia.securityContext"/>
|
||||
</hook>
|
||||
|
||||
<hook id="lps.front.hookmanager" class="LivraisonParSecteurs\Hook\FrontHook">
|
||||
<tag name="hook.event_listener" event="order-delivery.extra" type="front" method="onOrderDeliveryExtra" />
|
||||
<tag name="hook.event_listener" event="order-invoice.delivery-address" type="front" method="displayDeliveryDate" />
|
||||
</hook>
|
||||
|
||||
<hook id="lps.email.hookmanager" class="LivraisonParSecteurs\Hook\EmailHook">
|
||||
<tag name="hook.event_listener" event="email-html.order-confirmation.delivery-address" type="email" method="displayDeliveryDateWithinEmail" />
|
||||
<tag name="hook.event_listener" event="email-html.order-notification.delivery-address" type="email" method="displayDeliveryDateWithinEmail" />
|
||||
</hook>
|
||||
|
||||
</hooks>
|
||||
|
||||
</config>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) )
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr style="background-color:#1A712C; color:white">
|
||||
<th>{intl l="Scheduled date" d="livraisonparsecteurs"}</th>-->
|
||||
<td>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</td>-->
|
||||
<th>{intl l="Scheduled date" d="livraisonparsecteurs"}</th>
|
||||
<td>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</td>
|
||||
</tr>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<form name="planiflivraison.configuration" class="PlanificationLivraison\Form\Configuration" />
|
||||
</forms>
|
||||
|
||||
|
||||
<loops>
|
||||
<loop name="scheduled_deliveries" class="PlanificationLivraison\Loop\ScheduledDeliveriesLoop"/>
|
||||
</loops>
|
||||
@@ -24,6 +23,9 @@
|
||||
<hook id="planiflivraison.back.hook" class="PlanificationLivraison\Hook\BackHook">
|
||||
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfiguration" />
|
||||
</hook>
|
||||
<hook id="css.back.hook">
|
||||
<tag name="hook.event_listener" event="main.head-css" type="back" templates="css:assets/css/custom.css" />
|
||||
</hook>
|
||||
</hooks>
|
||||
|
||||
</config>
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
<foreign-key foreignTable="pdr_places" name="fk_order_delivery_place_id">
|
||||
<reference foreign="id" local="delivery_place_id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="lps_area_schedule" name="fk_order_delivery_schedule_id">
|
||||
<reference foreign="id" local="schedule_id" />
|
||||
</foreign-key>
|
||||
|
||||
</table>
|
||||
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Sqlfile -> Database map
|
||||
thelia.sql=thelia
|
||||
@@ -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;
|
||||
@@ -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]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
.mode-livraison {
|
||||
font-weight: 900;
|
||||
color: red;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
@@ -14,11 +14,18 @@
|
||||
<hook id="pdr.admin.hook" class="PointRetrait\Hook\AdminHook">
|
||||
<tag name="hook.event_listener" event="home.block" type="back" method="displayScheduledWithdrawals" />
|
||||
<tag name="hook.event_listener" event="main.in-top-menu-items" type="back" method="onMainTopMenuTools" />
|
||||
<tag name="hook.event_listener" event="order-edit.bill-delivery-address" type="back" method="displayDeliveryDate" />
|
||||
<argument type="service" id="thelia.securityContext"/>
|
||||
</hook>
|
||||
|
||||
<hook id="pdr.front.hook" class="PointRetrait\Hook\FrontHook">
|
||||
<tag name="hook.event_listener" event="order-delivery.extra" type="front" method="onOrderDeliveryExtra" />
|
||||
<tag name="hook.event_listener" event="order-invoice.delivery-address" type="front" method="displayWithdrawalDate" />
|
||||
</hook>
|
||||
|
||||
<hook id="pdr.email.hookmanager" class="PointRetrait\Hook\EmailHook">
|
||||
<tag name="hook.event_listener" event="email-html.order-confirmation.delivery-address" type="email" method="displayDeliveryDateWithinEmail" />
|
||||
<tag name="hook.event_listener" event="email-html.order-notification.before-products" type="email" method="displayCompleteInformationWithinEmail" />
|
||||
</hook>
|
||||
|
||||
</hooks>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
83
local/modules/PointRetrait/Hook/EmailHook.php
Normal file
83
local/modules/PointRetrait/Hook/EmailHook.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace PointRetrait\Hook;
|
||||
|
||||
use PlanificationLivraison\Model\SessionData;
|
||||
use PointRetrait\Model\PdrPlacesQuery;
|
||||
use PointRetrait\PointRetrait;
|
||||
use Thelia\Core\Event\Hook\HookRenderEvent;
|
||||
use Thelia\Core\Hook\BaseHook;
|
||||
use Thelia\Exception\TheliaProcessException;
|
||||
use Thelia\Model\OrderQuery;
|
||||
|
||||
|
||||
class EmailHook extends BaseHook
|
||||
{
|
||||
public function displayDeliveryDateWithinEmail(HookRenderEvent $event)
|
||||
{
|
||||
|
||||
$moduleId = $event->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");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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 : ");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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',
|
||||
'' => '',
|
||||
);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -64,3 +64,8 @@
|
||||
height: 25px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
.titre {
|
||||
font-weight: 900;
|
||||
color: red;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<tr><td> </td></tr>
|
||||
|
||||
<tr style="background-color:#1A712C; color:white">
|
||||
<th>{intl l="Scheduled date" d="pointretrait"}</th>
|
||||
<td>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</td>
|
||||
</tr>
|
||||
|
||||
<tr><td> </td></tr>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="panel panel-default col-md-12">
|
||||
<div class="panel-heading"><strong>{intl l="Scheduled date" d="pointretrait"}</strong></div>
|
||||
<div class="panel-body">
|
||||
<span>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default col-md-12">
|
||||
<div class="panel-heading"><strong>{intl l="Place name" d="pointretrait"}</strong></div>
|
||||
<div class="panel-body">
|
||||
<span>{format_address organization="{$placeName}"
|
||||
address_line1="{$address1}"
|
||||
postal_code="{$zipcode}"
|
||||
locality="{$city}"
|
||||
locale=$locale}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="panel panel-default col-sm-6">
|
||||
<div class="panel-heading">{intl l="Scheduled date" d="pointretrait"}</div>
|
||||
<div class="panel-body">
|
||||
<span>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,24 @@
|
||||
{strip}
|
||||
|
||||
<div class="panel panel-default col-sm-6">
|
||||
{loop type="pdr_places" name="place-loop" id={$place_id}}
|
||||
<div class="panel-heading">{intl l="Order to withdraw" d="pointretrait"}</div>
|
||||
<div class="panel-body">
|
||||
<span class="org"><strong>{$TITLE}</strong></span>
|
||||
<address class="adr">
|
||||
<span class="street-address">{$ADDRESS1}</span><br>
|
||||
{if $ADDRESS2 != ""}
|
||||
<span class="street-address">{$ADDRESS2}</span><br>
|
||||
{/if}
|
||||
<span class="locality">{$ZIPCODE} {$CITY}</span>
|
||||
</address>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<div class="panel-heading">{intl l="Scheduled date" d="pointretrait"}</div>
|
||||
<div class="panel-body">
|
||||
<span>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/strip}
|
||||
@@ -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 @@
|
||||
<p>{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'}}</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 actions">
|
||||
<div class="col-md-2 mode-livraison">
|
||||
{loop name="delivery-module-loop" type="module" id=$DELIVERY_MODULE}
|
||||
<p>{$CODE}</p>
|
||||
<p>{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"}</p>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 actions">
|
||||
<form class="form-horizontal" role="form" id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
|
||||
<input class="js-current-tab" type="hidden" name="tab" value="{$order_tab}">
|
||||
<div class="form-group">
|
||||
@@ -416,6 +429,17 @@
|
||||
<div class="payment-module-description">{$DESCRIPTION nofilter}</div>
|
||||
{/if}
|
||||
{/loop}
|
||||
|
||||
{if $planifPlaceId neq ''}
|
||||
{loop type="pdr_places" name="places-loop" id=$planifPlaceId}
|
||||
<p class="titre">{$TITLE}</p>
|
||||
<p>{$ADDRESS1}</p>
|
||||
{if $ADDRESS2 neq ''}
|
||||
<p>{$ADDRESS1}</p>
|
||||
{/if}
|
||||
<p>{$ZIPCODE} {$CITY}</p>
|
||||
{/loop}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{hook name="order-edit.delivery-module-bottom" order_id=$order_id module_id=$DELIVERY_MODULE}
|
||||
@@ -627,75 +651,78 @@
|
||||
|
||||
<table class="table table-condensed table-left-aligned">
|
||||
<tbody>
|
||||
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr data-field-class="js-company">
|
||||
<th>{intl l="Company"}</th>
|
||||
<td>{$COMPANY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-title" data-value="{$TITLE}">
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-firstname">
|
||||
<th>{intl l="Firstname"}</th>
|
||||
<td>{$FIRSTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-lastname">
|
||||
<th>{intl l="Lastname"}</th>
|
||||
<td>{$LASTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address1">
|
||||
<th>{intl l="Street address"}</th>
|
||||
<td>{$ADDRESS1}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address2">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS2}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address3">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS3}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-zipcode">
|
||||
<th>{intl l="Zip code"}</th>
|
||||
<td>{$ZIPCODE}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-city">
|
||||
<th>{intl l="City"}</th>
|
||||
<td>{$CITY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-country" data-value="{$COUNTRY}">
|
||||
<th>{intl l="Country"}</th>
|
||||
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY visible="*"}{$TITLE}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-state" data-value="{$STATE}">
|
||||
<th>{intl l="State"}</th>
|
||||
<td>
|
||||
{if $STATE}
|
||||
{loop type="state" name="order-delivery-address-state" id=$STATE visible="*"}{$TITLE}{/loop}
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-phone">
|
||||
<th>{intl l="Phone"}</th>
|
||||
<td>{$PHONE}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-cellphone">
|
||||
<th>{intl l="Cellphone"}</th>
|
||||
<td>{$CELLPHONE}</td>
|
||||
</tr>
|
||||
{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}
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr data-field-class="js-company">
|
||||
<th>{intl l="Company"}</th>
|
||||
<td>{$COMPANY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-title" data-value="{$TITLE}">
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-firstname">
|
||||
<th>{intl l="Firstname"}</th>
|
||||
<td>{$FIRSTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-lastname">
|
||||
<th>{intl l="Lastname"}</th>
|
||||
<td>{$LASTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address1">
|
||||
<th>{intl l="Street address"}</th>
|
||||
<td>{$ADDRESS1}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address2">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS2}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address3">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS3}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-zipcode">
|
||||
<th>{intl l="Zip code"}</th>
|
||||
<td>{$ZIPCODE}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-city">
|
||||
<th>{intl l="City"}</th>
|
||||
<td>{$CITY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-country" data-value="{$COUNTRY}">
|
||||
<th>{intl l="Country"}</th>
|
||||
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY visible="*"}{$TITLE}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-state" data-value="{$STATE}">
|
||||
<th>{intl l="State"}</th>
|
||||
<td>
|
||||
{if $STATE}
|
||||
{loop type="state" name="order-delivery-address-state" id=$STATE visible="*"}{$TITLE}{/loop}
|
||||
{else}
|
||||
-
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-phone">
|
||||
<th>{intl l="Phone"}</th>
|
||||
<td>{$PHONE}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-cellphone">
|
||||
<th>{intl l="Cellphone"}</th>
|
||||
<td>{$CELLPHONE}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{/elsehook}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
body{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
}ORDER_SET_DELIVERY_ADDRESS
|
||||
img{
|
||||
border:0;
|
||||
height:auto;
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<style>
|
||||
.message-important {
|
||||
color: red;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
{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:"}<br /><br />
|
||||
@@ -29,12 +42,25 @@
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" width="55%">
|
||||
{if $planifPlaceId neq ''}
|
||||
<strong>{intl l="Order to withdraw" d="pointretrait"}</strong><br>
|
||||
{loop type="pdr_places" name="places-loop" id=$planifPlaceId}
|
||||
<p>{$TITLE}<br>
|
||||
{$ADDRESS1}
|
||||
{if $ADDRESS2 neq ''}
|
||||
{$ADDRESS2}
|
||||
{/if}
|
||||
</p>
|
||||
<p>{$ZIPCODE} {$CITY}</p>
|
||||
{/loop}
|
||||
{else}
|
||||
<strong>{intl l="Delivery address:"}</strong><br>
|
||||
{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}
|
||||
</td>
|
||||
<td valign="top">
|
||||
<strong>{intl l="Billing address:"}</strong><br />
|
||||
@@ -43,6 +69,16 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{if $planifPlaceId neq ''}
|
||||
<span style="color:red; font-weight:900">
|
||||
{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"}
|
||||
}
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
{hook name="email-html.order-confirmation.after-address" order=$order_id}
|
||||
|
||||
<br />
|
||||
|
||||
@@ -1,146 +1,56 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'%nb Item' => '%nb élément',
|
||||
'%nb Items' => '%nb éléments',
|
||||
'+' => '+',
|
||||
'404' => '404',
|
||||
'<strong>Sorry!</strong> We are not able to give you a delivery method for your order.' => '<strong>Désolé !</strong>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 <a href=\'%link\' class=\'terms-quickview\'>Terms & Conditions</a>' => 'J\'ai lu et j\'accepte <a href=\'%link\' class=\'terms-quickview\'>les conditions générales de vente</a>',
|
||||
'If nothing happens within 10 seconds, <a id="force-submit-payment-form" href="#">please click here</a>.' => 'Si rien ne se passe dans les 10 secondes, <a id="force-submit-payment-form" href="#">merci de cliquer ici</a>. ',
|
||||
'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 <a href=\'mailto:%mail\'>administrator</a>' => 'Nous sommes désolés mais une erreur est survenue. Veuillez contacter l\'<a href=\'mailto:%mail\'>administrateur</a>',
|
||||
'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 :',
|
||||
);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{* Security *}
|
||||
|
||||
@@ -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"}
|
||||
<div class="panel panel-default col-sm-6">
|
||||
|
||||
Reference in New Issue
Block a user