为现金舍入更新 POS 打印收据
如果您的商店使用通过代码编辑器自定义的 POS 收据,则您可能需要手动更新您的 POS 打印收据,以确保收据上显示现金舍入。
这些更改需要熟悉 Shopify 通知模板中使用的代码。如果您的模板是高度自定义的,并且您不确定如何应用必要的更改,请联系进行更改的开发人员或点击恢复为默认值以将模板恢复到其原始状态。恢复为默认值后,您的所有自定义项都将被删除,但默认模板可确保您拥有最新的模板版本。
在本页
更新 POS 打印收据
您可以更新 POS 打印收据,使其显示付款和退款交易的现金舍入调整总额以及收据上的舍入后总金额。
步骤:
在 Shopify 后台中,转至 POS > 设置。
在 自定义 部分中,点击 打印小票,打开 POS 编辑器。
在收据自定义页面中,点击自定义收据 > 编辑代码或代码编辑器。
在
transactions.liquid模板中,找到包含<section class='totals'>的代码块。在该部分的末尾(在打印
receipt.total之后),如果订单上存在现金舍入,请添加order.total_cash_rounding_adjustment和order.total_adjusted_amountliquid 变量,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 %}