Articles sur : Widgets Management
Cet article est aussi disponible en :

Comment afficher le mode de livraison sélectionné et la date dans l'e-mail de confirmation de commande Shopify ?

Pour afficher le mode et la date de livraison sélectionnés dans l'e-mail de confirmation de commande Shopify, suivez les étapes ci-dessous.


**Étape 1 : Cliquez sur « Paramètres Shopify », « Notifications », puis sur « Notifications client ». **


Paramètres -> Notifications -> Notifications client


Étape 2 : Cliquez sur Confirmation de commande



Étape 3 : Cliquez sur Modifier le code



Étape 4 : Placez le code ci-dessous à l'endroit où vous souhaitez l'afficher. Assurez-vous de l'ajouter dans <table>


<!-- Scrollengine -->
<tr>
<td class="customer-info__item">
<h4>Préférences de livraison</h4>
<p>
{% if attributes["DELIVERY_METHOD"] %}
<div style="display:flex; gap:10px;"> Mode de livraison : {{ attributes["DELIVERY_METHOD"] }} </div>
{% else %}
<div style="display:flex; gap:10px;"> Mode de livraison : </div>
{% endif %}
</p>

<p>
{% if attributes["STORE_LOCATION"] %}
<div style="display:flex; gap:10px;"> Magasin : {{ attributes["STORE_LOCATION"] }} </div>
{% else %}
<div style="display:flex; gap:10px;"> Magasin : </div>
{% endif %}
</p>

<p>
{% if attributes["DATE"] %}
{% assign date_parts = attributes["DATE"] | split: "-" %}
<div style="display:flex; gap:10px;"> Date : {{ date_parts[2] }}/{{ date_parts[1] }}/{{ date_parts[0] }} </div>
{% else %}
<div style="display:flex; gap:10px;"> Date : </div>
{% endif %}
</p>

<p>
{% if attributes["SLOT"] %}
{% assign time_parts = attributes["SLOT"] | split: " " %}
{% assign start_time = time_parts[0] %}
{% assign start_period = time_parts[1] %}
{% assign end_time = time_parts[3] %}
{% assign end_period = time_parts[4] %}

{% comment %} Convertir l'heure de début au format 24 heures {% endcomment %}
{% assign start_hour_min = start_time | split: ":" %}
{% assign start_hour = start_hour_min[0] | plus: 0 %}
{% if start_period == "PM" and start_hour != 12 %}
{% assign start_hour = start_hour | plus: 12 %}
{% elsif start_period == "AM" and start_hour == 12 %}
{% assign start_hour = 0 %}
{% endif %}
{% assign start_time_24h = start_hour | append: ":" | append: start_hour_min[1] %}

{% comment %} Convertir l'heure de fin au format 24 heures {% endcomment %}
{% assign end_hour_min = end_time | split: ":" %}
{% assign end_hour = end_hour_min[0] | plus: 0 %}
{% if end_period == "PM" and end_hour != 12 %}
{% assign end_hour = end_hour | plus: 12 %}
{% elsif end_period == "AM" and end_hour == 12 %}
{% assign end_hour = 0 %}
{% endif %}
{% assign end_time_24h = end_hour | append: ":" | append: end_hour_min[1] %}

<div style="display:flex; gap:10px;"> Plage horaire : {{ start_time_24h }} - {{ end_time_24h }} </div>
{% else %}
<div style="display:flex; gap:10px;"> Plage horaire : </div>
{% endif %}
</p>
</td>
</tr>
<!-- Scrollengine -->


Ensuite, prévisualisez et enregistrez.


Si vous rencontrez toujours des problèmes, veuillez contacter le support.

Mis à jour le : 22/10/2025

Cet article a-t-il répondu à vos questions ?

Partagez vos commentaires

Annuler

Merci !