针对现金舍入更新 POS 打印收据

如果您的商店使用通过代码编辑器自定义的 POS 收据,则您可能需要手动更新您的 POS 打印收据,确保收据上显示现金舍入金额。

进行这些更改需要熟悉 Shopify 通知模板中使用的代码。如果您的模板已进行深度自定义,并且您不确定如何应用必要的更改,请联系进行过此类更改的开发人员,或者点击恢复为默认值以将模板恢复到初始状态。恢复为默认值后,您的所有自定义设置均会被移除,但默认模板可确保您拥有最新的模板版本。

更新 POS 打印收据

您可以更新 POS 打印收据,以便在收据中显示支付和退款交易的现金舍入调整总金额以及舍入后的总金额。

步骤:

  1. 在 Shopify 后台中,转至销售渠道 > POS

  2. 自定义店内体验部分中,点击收据对应的编辑

  3. 收据自定义页面中,点击自定义您的收据 > 编辑代码,或点击代码编辑器

  4. transactions.liquid 模板中,找到包含 <section class='totals'> 的代码块。

  5. 在此部分的末尾(即在代码打印 receipt.total 之后),如果订单中存在现金舍入,请添加 order.total_cash_rounding_adjustmentorder.total_adjusted_amount Liquid 变量,POS 客户端将把它们分别设置为现金舍入调整总金额和舍入后的总金额。

{% if order.total_cash_rounding_adjustment %}
    {% comment %} order.total_cash_rounding_adjustment is a string, converting for safety edited {% endcomment %}
    {% assign rounding = order.total_cash_rounding_adjustment | plus: 0 | abs %}
    {% if rounding > 0 %}
      <div class='rounding-row-top-border'></div>
      <div class='totals-container'>
        <p class='totals-text'>{{ 'receipt.cash_rounding' | t | capitalize }}</p>
        <p>{{ order.total_cash_rounding_adjustment | money | escape }}</p>
      </div>
      <div class='totals-container'>
        <p class='totals-bold-text'>{{ 'receipt.adjusted_total' | t | capitalize }}</p>
        <p class='price'>{{ order.total_adjusted_amount | money | escape }}</p>
      </div>
    {% endif %}
  {% endif %}