Ciao a tutti!
Non so perchè ma il codice che avevo modificato per la notifica al cliente del carrello abbandonato, non funziona più come dovrebbe.
Io vorrei semplicemente inserire:
oggetto: 12% di sconto se concludi subito il tuo ordine!
testo email:
Ciao {{ billing_address.first_name }}, hai aggiunto qualcosa al tuo carrello ma non hai completato l’acquisto.
<b>
Quello che volevi è ancora disponibile, e se completi subito i tuoi acquisti, ti offriamo il 12% di sconto su tutto!
</br>
<br>
Ti basterà usare il codice <b> I-NEED-WANDERLUST </b> in fase di pagamento. 🙂
</br>
Ma in anteprima e al cliente arriva solo l'oggetto e l'elenco dei prodotti nel carrello.
Ora, io ho rimesso le impostazioni originali per non lasciarlo così con il codice sballato, ma vi chiedo gentilmente di aiutarmi a scrivere il codice corretto 😞
Vi incollo la versione standard che ho ora, sperando possiate modificarmela.
PS: perchè il corpo del messaggio si ripete tante volte?
grazie!
codice:
{% capture email_title %}
{% if item_count == 1 %}
Hai lasciato un articolo nel carrello
{% else %}
Hai lasciato articoli nel carrello
{% endif %}
{% endcapture %}
{% capture email_body %}
{% if billing_address.first_name %}
{% if item_count == 1 %}
Ciao {{ billing_address.first_name }}, hai aggiunto un articolo al tuo carrello e non hai completato l’acquisto. L’articolo è ancora disponibile, puoi completare l’acquisto ora.
{% else %}
Ciao {{ billing_address.first_name }}, hai aggiunto articoli al tuo carrello e non hai completato l’acquisto. Gli articoli sono ancora disponibili, puoi completare l’acquisto ora.
{% endif %}
{% else %}
{% if item_count == 1 %}
Ciao, hai aggiunto un articolo al tuo carrello e non hai completato l’acquisto. L’articolo è ancora disponibile, puoi completare l’acquisto ora.
{% else %}
Ciao, hai aggiunto articoli al tuo carrello e non hai completato l’acquisto. Gli articoli sono ancora disponibili, puoi completare l’acquisto ora.
{% endif %}
{% endif %}
{% endcapture %}
<!DOCTYPE html>
<html lang="it-IT">
<head>
<title>{{ email_title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="/assets/notifications/styles.css">
<style>
.button__cell { background: {{ shop.email_accent_color }}; }
a, a:hover, a:active, a:visited { color: {{ shop.email_accent_color }}; }
</style>
</head>
<body>
<table class="body">
<tr>
<td>
<table class="header row">
<tr>
<td class="header__cell">
<center>
<table class="container">
<tr>
<td>
<table class="row">
<tr>
<td class="shop-name__cell">
{%- if shop.email_logo_url %}
<img src="{{shop.email_logo_url}}" alt="{{ shop.name }}" width="{{ shop.email_logo_width }}">
{%- else %}
<h1 class="shop-name__text">
<a href="{{shop.url}}">{{ shop.name }}</a>
</h1>
{%- endif %}
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<table class="row content">
<tr>
<td class="content__cell">
<center>
<table class="container">
<tr>
<td>
<h2>{{ email_title }}</h2>
{% if custom_message != blank %}
<p>{{ custom_message }}</p>
{% else %}
<p>{{ email_body }}</p>
{% endif %}
<table class="row actions">
<tr>
<td class="empty-line"> </td>
</tr>
<tr>
<td class="actions__cell">
<table class="button main-action-cell">
<tr>
<td class="button__cell"><a href="{{ url }}" class="button__text">Articoli nel carrello</a></td>
</tr>
</table>
{% if shop.url %}
<table class="link secondary-action-cell">
<tr>
<td class="link__cell">o <a href="{{ shop.url }}">Visita il nostro negozio</a></td>
</tr>
</table>
{% endif %}
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<table class="row section">
<tr>
<td class="section__cell">
<center>
<table class="container">
<tr>
<td>
<h3>Completa il tuo acquisto</h3>
</td>
</tr>
</table>
<table class="container">
<tr>
<td>
<table class="row">
{% for line in subtotal_line_items %}
<tr class="order-list__item">
<td class="order-list__item__cell">
<table>
<td>
{% if line.image %}
<img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
{% endif %}
</td>
<td class="order-list__product-description-cell">
{% if line.product.title %}
{% assign line_title = line.product.title %}
{% else %}
{% assign line_title = line.title %}
{% endif %}
{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
<span class="order-list__item-title">{{ line_title }} × {{ line_display }}</span><br/>
{% if line.variant.title != 'Default Title' %}
<span class="order-list__item-variant">{{ line.variant.title }}</span><br/>
{% endif %}
{% if line.selling_plan_allocation %}
<span class="order-list__item-variant">{{ line.selling_plan_allocation.selling_plan.name }}</span><br/>
{% endif %}
{% if line.refunded_quantity > 0 %}
<span class="order-list__item-refunded">Rimborsato</span>
{% endif %}
{% if line.discount_allocations %}
{% for discount_allocation in line.discount_allocations %}
{% if discount_allocation.discount_application.target_selection != 'all' %}
<span class="order-list__item-discount-allocation">
<img src="{{ 'notifications/discounttag.png' | shopify_asset_url }}" width="18" height="18" class="discount-tag-icon" />
<span>
{{ discount_allocation.discount_application.title | upcase }}
(-{{ discount_allocation.amount | money }})
</span>
</span>
{% endif %}
{% endfor %}
{% endif %}
</td>
</table>
</td>
</tr>{% endfor %}
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<table class="row footer">
<tr>
<td class="footer__cell">
<center>
<table class="container">
<tr>
<td>
<p class="disclaimer__subtext">Non vuoi ricevere promemoria sul carrello da noi? <a href="{{ unsubscribe_url }}">Annulla l’iscrizione</a></p>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
<img src="{{ 'notifications/spacer.png' | shopify_asset_url }}" class="spacer" height="1" />
</td>
</tr>
</table>
</body>
</html>