עדכון של התראת הדוא"ל POS exchange V2 receipt עבור עיגול
אם החנות שלך משתמשת ב-תבניות התראה מותאמות אישית, ייתכן שיהיה עליך לעדכן ידנית את התראת הדוא"ל של POS exchange V2 receipt כדי להבטיח שהיא תציג עיגול בקבלה.
שינויים אלה מחייבים היכרות עם הקוד המשמש בתבניות ההתראה של Shopify. אם התבניות הותאמו אישית באופן משמעותי ואינך בטוח כיצד לבצע את השינויים הנדרשים, יש לפנות למפתח שביצע אותם או ללחוץ על חזרה לברירת המחדל כדי לשחזר את התבנית למצבה המקורי. בעת החזרה לברירת המחדל, כל ההתאמות האישיות מוסרות, אך תבנית ברירת המחדל מבטיחה שתהיה לך גרסת תבנית עדכנית.
עדכון של התראת הדוא"ל POS exchange V2 receipt
ניתן לעדכן את ההתראה POS exchange V2 receipt כדי להציג את סכום העיגול נטו הנובע מעסקאות החלפה, יחד עם סכום ההחלפה הכולל המעוגל בקבלה.
שלבים:
מלוח המנהל של Shopify, יש לעבור אל הגדרות > התראות.
יש ללחוץ על התראות ללקוחות.
בסעיף נקודת מכירה, יש ללחוץ על POS exchange V2 receipt.
יש ללחוץ על עריכת קוד.
יש להוסיף לוגיקה לחישוב סכום העיגול נטו ולהוסיף אותו אל
exchange_total.- יש לאתר את בלוק הקוד המכיל את
<span>Exchange total</span>. - יש להחליף את בלוק הקוד הקיים בבלוק הקוד הבא, המחשב את
net_exchange_roundingומוסיף אותו אלexchange_total:
- יש לאתר את בלוק הקוד המכיל את
<table class="row subtotal-table">
<div class="subtotal-table--total subtotal-table--total-no-border">
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Exchange total</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{% if exchange_total < 0 %}-{% endif %}{{ exchange_total | abs | money_with_currency }}</strong>
</td>
</tr>
</div>
{% assign net_exchange_rounding = 0 %}
{% for transaction in transactions %}
{% if transaction.status == "success" %}
{% if transaction.kind == "sale" or transaction.kind == "capture" %}
{% if transaction.amount_rounding != nil %}
{% assign net_exchange_rounding = net_exchange_rounding | plus: transaction.amount_rounding %}
{% endif %}
{% elsif transaction.kind == "refund" or transaction.kind == "change" %}
{% if transaction.amount_rounding != nil %}
{% assign net_exchange_rounding = net_exchange_rounding | minus: transaction.amount_rounding %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if net_exchange_rounding != 0 %}
<table class="row subtotal-table subtotal-table--total">
<div class="subtotal-line__value-small">
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p> <span>Cash rounding</span> </p>
</td>
<td class="subtotal-line__value">
<strong>{% if net_exchange_rounding < 0 %}-{% endif %} {{ net_exchange_rounding | abs | money }}</strong>
</td>
</tr>
</div>
</table>
<table class="row subtotal-table subtotal-table--total">
{% assign rounded_exchange_total = exchange_total | plus: net_exchange_rounding %}
{% if rounded_exchange_total > 0 %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p> <span>Paid</span> </p>
</td>
<td class="subtotal-line__value">
<strong>{{ rounded_exchange_total | money_with_currency }}</strong>
</td>
</tr>
{% elsif rounded_exchange_total < 0 %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p> <span>Refund</span> </p>
</td>
<td class="subtotal-line__value">
<strong>-{{ rounded_exchange_total | abs | money_with_currency }}</strong>
</td>
</tr>
{% else %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p> <span>Adjusted exchange total</span> </p>
</td>
<td class="subtotal-line__value">
<strong>{{ rounded_exchange_total | money_with_currency }}</strong>
</td>
</tr>
{% endif %}
</table>
{% endif %}
</table>