将自定义通知添加到感谢页面
在特殊节日或在货源处理速度比平时慢的情况下,您可以将通知添加到感谢页面,让客户把握信息,以避免因延迟交货而取消订单的情况。

在ShopBase后台上,选择 Online Store > Themes > Customize。单击 Checkout Page,然后往下拉到 More Customization部分。

将以下脚本粘贴到 Put your custom JavaScript code here to add and change some content of Checkout pages部分:
在 var message 部分中,您可以根据需要更改通知内容。
点击 Save以保存。
将自定义通知添加到产品页面
将自定义脚本添加到感谢页面

指南
在ShopBase后台上,选择 Online Store > Themes > Customize。单击 Checkout Page,然后往下拉到 More Customization部分。

将以下脚本粘贴到 Put your custom JavaScript code here to add and change some content of Checkout pages部分:
var message = 'We are committed to delivering your orders as soon as possible.';
function addMessageBlock() {
setTimeout(function() {
const contentBoxes = document.querySelectorAll('#checkout .main .content-box');
if (!contentBoxes || contentBoxes.length === 0) {
return;
}
const messageBox = '<div class="content-box" id="additional-content-box"><div class="content-box__row"><div class="content-box__wrapper"><p class="os-step__description">' + message + '</p></div></div></div>';
if (!document.getElementById("additional-content-box")) {
contentBoxes[0].insertAdjacentHTML('afterend', messageBox);
}
}, 500);
}
window.sbsdk.ready(function() {
window.sbsdk.page.onContextUpdate(function(context) {
if (context.type === 'post_checkout') {
addMessageBlock();
}
});
});
在 var message 部分中,您可以根据需要更改通知内容。
点击 Save以保存。
关联页面
将自定义通知添加到产品页面
将自定义脚本添加到感谢页面
更新于: 09/09/2022
谢谢!