PlanificationLivraison : on avance sur les templates d'email

This commit is contained in:
2021-03-09 21:31:05 +01:00
parent c97324ff5f
commit 1196868062
42 changed files with 556 additions and 512 deletions

View File

@@ -32,6 +32,12 @@
{ifloop rel='the-order'}
{loop type="scheduled_deliveries" name="order-schedule-loop" order_id=$order_id}
{assign var="planifDebut" value=$START_DATE}
{assign var="planifFin" value=$END_DATE}
{assign var="planifPlaceId" value=$PLACE_ID}
{/loop}
{loop type="order" name="the-order" id=$order_id customer="*" with_prev_next_info="true" backend_context="1"}
{loop type="currency" name="order-currency" id=$CURRENCY}
@@ -44,7 +50,14 @@
<p>{intl l='Order placed on %order_date at %order_time' order_date={format_date date=$CREATE_DATE output='date'} order_time={format_date date=$CREATE_DATE output='time'}}</p>
</div>
<div class="col-md-6 actions">
<div class="col-md-2 mode-livraison">
{loop name="delivery-module-loop" type="module" id=$DELIVERY_MODULE}
<p>{$CODE}</p>
<p>{format_date date=$planifDebut output='date' format="d/m"} entre {format_date date=$planifDebut output='time' format="H\hi"} et {format_date date=$planifFin output='time' format="H\hi"}</p>
{/loop}
</div>
<div class="col-md-4 actions">
<form class="form-horizontal" role="form" id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
<input class="js-current-tab" type="hidden" name="tab" value="{$order_tab}">
<div class="form-group">
@@ -416,6 +429,17 @@
<div class="payment-module-description">{$DESCRIPTION nofilter}</div>
{/if}
{/loop}
{if $planifPlaceId neq ''}
{loop type="pdr_places" name="places-loop" id=$planifPlaceId}
<p class="titre">{$TITLE}</p>
<p>{$ADDRESS1}</p>
{if $ADDRESS2 neq ''}
<p>{$ADDRESS1}</p>
{/if}
<p>{$ZIPCODE} {$CITY}</p>
{/loop}
{/if}
</div>
{hook name="order-edit.delivery-module-bottom" order_id=$order_id module_id=$DELIVERY_MODULE}
@@ -627,75 +651,78 @@
<table class="table table-condensed table-left-aligned">
<tbody>
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr data-field-class="js-company">
<th>{intl l="Company"}</th>
<td>{$COMPANY}</td>
</tr>
<tr data-field-class="js-title" data-value="{$TITLE}">
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr data-field-class="js-firstname">
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr data-field-class="js-lastname">
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr data-field-class="js-address1">
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr data-field-class="js-address2">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr data-field-class="js-address3">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr data-field-class="js-zipcode">
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr data-field-class="js-city">
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr data-field-class="js-country" data-value="{$COUNTRY}">
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY visible="*"}{$TITLE}{/loop}</td>
</tr>
<tr data-field-class="js-state" data-value="{$STATE}">
<th>{intl l="State"}</th>
<td>
{if $STATE}
{loop type="state" name="order-delivery-address-state" id=$STATE visible="*"}{$TITLE}{/loop}
{else}
-
{/if}
</td>
</tr>
<tr data-field-class="js-phone">
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
<tr data-field-class="js-cellphone">
<th>{intl l="Cellphone"}</th>
<td>{$CELLPHONE}</td>
</tr>
{ifhook rel="order-edit.bill-delivery-address"}
{ifhook rel="order-edit.bill-delivery-address"}
{* delivery module can customize the delivery address *}
{hook name="order-edit.bill-delivery-address" module="$DELIVERY_MODULE" order_id={$order_id}}
{/ifhook}
{/loop}
{/ifhook}
{elsehook rel="order-edit.bill-delivery-address"}
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr data-field-class="js-company">
<th>{intl l="Company"}</th>
<td>{$COMPANY}</td>
</tr>
<tr data-field-class="js-title" data-value="{$TITLE}">
<th>{intl l="Title"}</th>
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
</tr>
<tr data-field-class="js-firstname">
<th>{intl l="Firstname"}</th>
<td>{$FIRSTNAME}</td>
</tr>
<tr data-field-class="js-lastname">
<th>{intl l="Lastname"}</th>
<td>{$LASTNAME}</td>
</tr>
<tr data-field-class="js-address1">
<th>{intl l="Street address"}</th>
<td>{$ADDRESS1}</td>
</tr>
<tr data-field-class="js-address2">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS2}</td>
</tr>
<tr data-field-class="js-address3">
<th>{intl l="Additional address"}</th>
<td>{$ADDRESS3}</td>
</tr>
<tr data-field-class="js-zipcode">
<th>{intl l="Zip code"}</th>
<td>{$ZIPCODE}</td>
</tr>
<tr data-field-class="js-city">
<th>{intl l="City"}</th>
<td>{$CITY}</td>
</tr>
<tr data-field-class="js-country" data-value="{$COUNTRY}">
<th>{intl l="Country"}</th>
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY visible="*"}{$TITLE}{/loop}</td>
</tr>
<tr data-field-class="js-state" data-value="{$STATE}">
<th>{intl l="State"}</th>
<td>
{if $STATE}
{loop type="state" name="order-delivery-address-state" id=$STATE visible="*"}{$TITLE}{/loop}
{else}
-
{/if}
</td>
</tr>
<tr data-field-class="js-phone">
<th>{intl l="Phone"}</th>
<td>{$PHONE}</td>
</tr>
<tr data-field-class="js-cellphone">
<th>{intl l="Cellphone"}</th>
<td>{$CELLPHONE}</td>
</tr>
{/loop}
{/elsehook}
</tbody>
</table>
</div>