Il manquait un bout de PlanificationLivraison en conf

This commit is contained in:
2021-02-24 15:36:09 +01:00
parent 4ad626c47d
commit fffc4430c5
10 changed files with 985 additions and 3 deletions

View File

@@ -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
])
);
}
}
}
}