[15/04/2023] Pb d'emails de livraison : correction du mauvais IS_SENT récupéré
This commit is contained in:
@@ -46,7 +46,9 @@ class OrderStatusListener implements EventSubscriberInterface
|
||||
if (null !== $is_order_status_to_notify) {
|
||||
|
||||
$delivery_module = $order->getModuleRelatedByDeliveryModuleId()->getCode();
|
||||
$new_status_is_sent = false;
|
||||
if ($order_status_code === OrderStatus::CODE_SENT) {
|
||||
$new_status_is_sent = true;
|
||||
switch ($delivery_module) {
|
||||
case "MondialRelay":
|
||||
$delivery_link = 'https://www.mondialrelay.fr/suivi-de-colis/' . $order->getDeliveryRef();
|
||||
@@ -76,6 +78,7 @@ class OrderStatusListener implements EventSubscriberInterface
|
||||
'order_id' => $order->getId(),
|
||||
'order_ref' => $order->getRef(),
|
||||
'new_status' => $new_statut_label,
|
||||
'new_status_is_sent' => $new_status_is_sent,
|
||||
'delivery_link'=> $delivery_link
|
||||
]
|
||||
);
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
|
||||
{* Content *}
|
||||
{block name="email-content"}
|
||||
{loop name="order.invoice" type="order" id=$order_id customer="*"}
|
||||
|
||||
{loop name="order.invoice" type="order" id=$order_id customer="*" backend_context=true}
|
||||
{loop name="currency.order" type="currency" id=$CURRENCY}
|
||||
{assign var="orderCurrencyIsoCode" value=$ISOCODE}
|
||||
{/loop}
|
||||
@@ -74,7 +75,7 @@
|
||||
{intl l="Paid With:"} {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}<br />
|
||||
{intl l="Purchase Date:"} {format_date date=$CREATE_DATE output="datetime"}<br />
|
||||
{intl l="Delivery method:"} {loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}<br />
|
||||
{if $IS_SENT}
|
||||
{if $new_status_is_sent}
|
||||
{intl l="Follow your order here:" d="orderstatusnotify"} <strong>{intl l="Delivery link" d="orderstatusnotify" link={$delivery_link}}</strong><br />
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user