LivraisonParSecteurs : rajout de quelques infos dans le template front
This commit is contained in:
@@ -41,6 +41,29 @@ class FrontHook extends BaseHook
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function displayDeliveryDate(HookRenderEvent $event)
|
||||
{
|
||||
if ((null !== $order = $this->getSession()->getOrder()) && $order->getDeliveryModuleId() == LivraisonParSecteurs::getModuleId())
|
||||
{
|
||||
$selectedDay = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_DATE);
|
||||
$beginTime = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_BEGIN_TIME);
|
||||
$endTime = $this->getSession()->get(LivraisonParSecteurs::LPS_DELIVERY_END_TIME);
|
||||
|
||||
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