Il manquait un bout de PlanificationLivraison en conf
This commit is contained in:
@@ -34,4 +34,30 @@ class AdminHook extends BaseHook
|
||||
}
|
||||
}
|
||||
|
||||
public function displayDeliveryDate(HookRenderEvent $event)
|
||||
{
|
||||
|
||||
$moduleId = $event->getArgument('module');
|
||||
$orderId = $event->getArgument('order_id');
|
||||
|
||||
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);
|
||||
|
||||
if ( (null !== $selectedDay) && (null !== $beginTime) && (null !== $endTime) )
|
||||
{
|
||||
$event->add(
|
||||
$this->render(
|
||||
'delivery-address.html', [
|
||||
'day' => $selectedDay,
|
||||
'begin_time' => $beginTime,
|
||||
'end_time' => $endTime
|
||||
])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user