تحديث إشعار البريد الإلكتروني لإيصال تبادل POS بالإصدار الثاني للتقريب النقدي

إذا كان متجرك يستخدم قوالب إشعارات مخصصة، فقد تحتاج إلى تحديث إشعار البريد الإلكتروني الخاص بـ إيصال استبدال POS V2 يدويًا لضمان عرض تقريب المبالغ النقدية في الإيصال.

تتطلب هذه التغييرات الإلمام بالتعليمات البرمجية المستخدمة في قوالب إشعارات Shopify. إذا كانت قوالبك مخصصة بدرجة كبيرة ولست متأكدًا من كيفية تطبيق التغييرات اللازمة، فاتصل بالمطور الذي أجرى التغييرات أو انقر على الرجوع إلى الوضع الافتراضي لاستعادة قالبك إلى حالته الأصلية. عند الرجوع إلى الوضع الافتراضي، تتم إزالة جميع تخصيصاتك، لكن القالب الافتراضي يضمن حصولك على أحدث إصدار من القالب.

تحديث إشعار البريد الإلكتروني لإيصال استبدال POS V2

يمكنك تحديث إشعار إيصال استبدال POS V2 لعرض صافي مبلغ تقريب النقد الناتج عن معاملات الاستبدال، إلى جانب إجمالي مبلغ الاستبدال المقرّب في الإيصال.

الخطوات:

  1. من مشرف Shopify، انتقل إلى الإعدادات > الإشعارات.

  2. انقر على إشعارات العملاء.

  3. في قسم نقطة البيع، انقر على إيصال استبدال POS V2.

  4. انقر على تعديل التعليمات البرمجية.

  5. أضف منطقًا لحساب صافي مبلغ تقريب النقد وأضفه إلى exchange_total.

    1. حدد موقع كتلة التعليمات البرمجية التي تحتوي على <span>Exchange total</span>.
    2. استبدل كتلة التعليمات البرمجية الحالية بكتلة التعليمات البرمجية التالية التي تحسب 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>