更新“已创建退货”电子邮件通知以用于换货
已于 Jul 26, 2024 打印了此页面。若要查看当前版本,请访问 https://help.shopify.com/zh-CN/manual/orders/notifications/exchanges-notifications/return-created-notification。
如果您的商店使用自定义通知模板,则您可能需要手动更新已创建退货电子邮件通知,确保在退货中添加换货商品时能正常工作。
执行这些更改需要熟悉 Shopify 通知模板中使用的代码。如果模板经过高度自定义并且您不确定如何应用必要的更改,您可以联系执行更改的开发人员,或点击恢复为默认值来将模板恢复为原始状态。恢复为默认值后,您的所有自定义都将被删除,但默认模板可确保您获得最新的模板版本。
本页相关主题
更新“已创建退货”电子邮件通知
您可以更新已创建退货通知,以包含以下更改:
- 如果换货存在应付净额,客户现在可在退货电子邮件中执行付款操作(立即付款按钮)。这包括对电子邮件的说明部分进行更新,以反映客户可拖欠的未清账款,并且说明将被移至电子邮件顶部。
- 一个新分区,该分区在待接收商品的标题下显示换货商品,并将已退货商品部分重命名为退货商品。
- 财务摘要包含在退货电子邮件中,其中包括退货成本和换货商品以及适用的退货费用。
步骤:
- 在 Shopify 后台中,转至设置 > 通知。
- 点击客户通知。
- 在退货部分,点击已创建退货。
- 点击编辑代码。
- 找到
{% if return_delivery.type == 'shopify_label' %}
的第一个实例,然后更新“退货 Shopify Shipping 说明”:- 找到
<p class="return-creation__subtitle">...</p>
代码行。 - 在该代码行后添加以下代码块:
- 找到
<div class="return-label-beta__instructions">
<h2>Instructions</h2>
<ol>
<li>Pack the items you're returning.</li>
{% if return.checkout_payment_collection_url %}
<li>Pay the outstanding balance.</li>
{% endif %}
<li>Print your return shipping label. If you haven’t received it yet, we’ll send it to you soon.</li>
<li>Attach the label to the package. Cover or remove any old shipping labels.</li>
<li>
{% if return_delivery.carrier_name %}
Give the package to {{ return_delivery.carrier_name }}.
{% else %}
Give the package to the carrier identified on the label.
{% endif %}
</li>
<li>
Track your return using <a target="_blank" href="{{ return_delivery.tracking_url) }}">your tracking number</a> to make sure we get it.
</li>
</ol>
</div>
- 更新行动号召操作,以包含立即支付逻辑:
- 找到
<table class="row actions">...</table>
代码行。 - 将现有代码块替换为以下代码块:
- 找到
{% capture url_primary %}{{ return.checkout_payment_collection_url }}{% endcapture %}
{% capture text_primary %}Pay now{% endcapture %}
{% capture url_secondary %}{% endcapture %}
{% capture text_secondary %}{% endcapture %}
{% if url_primary != blank or url_secondary != blank %}
<table class="row actions">
<tr>
<td class="empty-line"> </td>
</tr>
<tr>
<td class="actions__cell">
{% if url_primary != blank %}
<table class="button main-action-cell">
<tr>
<td class="button__cell">
<a href="{{ url_primary }}" class="button__text">{{ text_primary }}</a>
</td>
</tr>
</table>
{% endif %}
{% if url_secondary != blank %}
<table class="button return__mobile-padding main-action-cell">
<tr>
<td class="button__cell">
<a href="{{ url_secondary }}" class="button__text return__main-button">{{ text_secondary }}</a>
</td>
</tr>
</table>
{% endif %}
{% endif %}
- 找到
{% elsif return_delivery.type == 'manual' %}
的第一个实例,然后更新“退货指南 Shipping 说明”:- 找到
<p class="return-creation__subtitle">...</p>
代码行。 - 在该代码行后添加以下代码块:
- 找到
<div class="return-label-beta__instructions">
<h2>Instructions</h2>
<ol>
<li>Pack the items you're returning.</li>
{% if return.checkout_payment_collection_url %}
<li>Pay the outstanding balance.</li>
{% endif %}
<li>Print your return shipping label. If you haven’t received it yet, we’ll send it to you soon.</li>
<li>Attach the label to the package. Cover or remove any old shipping labels.</li>
<li>
{% if return_delivery.carrier_name %}
Give the package to {{ return_delivery.carrier_name }}.
{% else %}
Give the package to the carrier identified on the label.
{% endif %}
</li>
<li>
Track your return using <a target="_blank" href="{{ return_delivery.tracking_url) }}">your tracking number</a> to make sure we get it.
</li>
</ol>
</div>
- 在前一步之后,在
{% elsif return_delivery.type == 'manual' %}
代码块中添加以下代码块:
{% capture url_primary %}{{ return.checkout_payment_collection_url }}{% endcapture %}
{% capture text_primary %}Pay now{% endcapture %}
{% capture url_secondary %}{% endcapture %}
{% capture text_secondary %}{% endcapture %}
{% if url_primary != blank or url_secondary != blank %}
<table class="row actions">
<tr>
<td class="empty-line"> </td>
</tr>
<tr>
<td class="actions__cell">
{% if url_primary != blank %}
<table class="button main-action-cell">
<tr>
<td class="button__cell">
<a href="{{ url_primary }}" class="button__text">{{ text_primary }}</a>
</td>
</tr>
</table>
{% endif %}
{% if url_secondary != blank %}
<table class="button return__mobile-padding main-action-cell">
<tr>
<td class="button__cell">
<a href="{{ url_secondary }}" class="button__text return__main-button">{{ text_secondary }}</a>
</td>
</tr>
</table>
{% endif %}
<table class="link secondary-action-cell">
<tr>
<td class="link__cell">or <a target="_blank" href="{{ order.order_status_url }}">View your order</a></td>
</tr>
</table>
</td>
</tr>
</table>
{% endif %}
-
删除通知底部的旧说明:
- 找到
<h3>Instructions</h3>
代码行。 - 找到并删除
<table class="row section">...</table>
的整个代码块。
- 找到
-
添加换货订单项目并更新退货商品标题:
- 找到
<h3>Returned items</h3>
标签。 - 将匹配
<table class="row section">
的外部表替换为以下块:
- 找到
<table class="row content">
<tr>
<td class="content__cell">
<center>
<table class="container">
<tr>
<td>
<h2>Items to return</h2>
<table class="row">
{% for line_item in return.line_items %}
<tr class="order-list__item">
<td class="order-list__item__cell">
<table>
<td>
{% if line_item.image %}
<img src="{{ line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
{% endif %}
</td>
<td class="order-list__product-description-cell">
{% assign line_display = line_item.quantity %}
<span class="order-list__item-title">{{ line_item.title_without_variant }} × {{ line_display }}</span><br/>
{% if line_item.variant.title != 'Default Title' %}
<span class="order-list__item-variant">{{ line_item.variant.title }}</span><br/>
{% endif %}
{% if line_item.discount_allocations %}
{% for discount_allocation in line_item.discount_allocations %}
{% if discount_allocation.amount > 0 %}
<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>
<td class="order-list__price-cell">
{% if line_item.original_line_price != line_item.final_line_price %}
<del class="order-list__item-original-price">{{ line_item.original_line_price | money }}</del>
{% endif %}
<p class="order-list__item-price">
{% if line_item.final_line_price > 0 %}
{{ line_item.final_line_price | money }}
{% else %}
Free
{% endif %}
</p>
</td>
</table>
</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
{% if return.exchange_line_items.size > 0 %}
<table class="row content">
<tr>
<td class="content__cell">
<center>
<table class="container">
<tr>
<td>
<h2>Items you'll receive</h2>
<table class="row">
{% for line_item in return.exchange_line_items %}
<tr class="order-list__item">
<td class="order-list__item__cell">
<table>
<td>
{% if line_item.image %}
<img src="{{ line_item | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
{% endif %}
</td>
<td class="order-list__product-description-cell">
{% assign line_display = line_item.quantity %}
<span class="order-list__item-title">{{ line_item.title_without_variant }} × {{ line_display }}</span><br/>
{% if line_item.variant.title != 'Default Title' %}
<span class="order-list__item-variant">{{ line_item.variant.title }}</span><br/>
{% endif %}
{% if line_item.discount_allocations %}
{% for discount_allocation in line_item.discount_allocations %}
{% if discount_allocation.amount > 0 %}
<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>
<td class="order-list__price-cell">
{% if line_item.original_line_price != line_item.final_line_price %}
<del class="order-list__item-original-price">{{ line_item.original_line_price | money }}</del>
{% endif %}
<p class="order-list__item-price">
{% if line_item.final_line_price > 0 %}
{{ line_item.final_line_price | money }}
{% else %}
Free
{% endif %}
</p>
</td>
</table>
</td>
</tr>
{% endfor %}
</table>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
{% endif %}
- 引入财务和退货费用。在前一步的更改后添加以下块,或在
<table class="row footer">
代码行之前添加以下块:
<table class="row section">
<tr>
<td class="section__cell">
<center>
<table class="container">
<tr>
<td>
<table class="row subtotal-lines">
<tr>
<td class="subtotal-spacer"></td>
<td>
<table class="row subtotal-table">
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Subtotal</span>
</p>
</td>
<td class="subtotal-line__value">
<span>{{ return.line_items_subtotal_price | money }}</span>
</td>
</tr>
{% assign fees = return.fees %}
{% for fee in fees %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>{{ fee.title }}</span>
</p>
</td>
<td class="subtotal-line__value">
<span>{{ fee.subtotal | money }}</span>
</td>
</tr>
{% endfor %}
{% if return.total_tax_price > 0 %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Estimated taxes</span>
</p>
</td>
<td class="subtotal-line__value">
<span>{{ return.total_tax_price | money }}</span>
</td>
</tr>
{% endif %}
{% if return.total_price > 0 %}
<table class="row subtotal-table subtotal-table--total">
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Amount to pay</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ return.total_price | money_with_currency }}</strong>
</td>
</tr>
</table>
{% elsif return.total_price <= 0 %}
<table class="row subtotal-table subtotal-table--total">
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Estimated refund</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ return.total_price | abs | money_with_currency }}</strong>
</td>
</tr>
</table>
{% endif %}
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
- 点击保存。