LivraisonParSecteurs : rajout de quelques infos dans le template front

This commit is contained in:
2021-02-22 17:09:05 +01:00
parent fa7ef7c6d3
commit d05184bf05
9 changed files with 648 additions and 28 deletions

View File

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