将倒计时器和信任因素添加到结账页面
在本文中,我们将指导您将两种有效的工具添加到结账页面以增加商店的转化率。一种是倒计时器,通过为客户带来紧迫感来促使他们快速完成结账。另一种是可靠信息(如有关产品保修、成功订单数量的信息),有助于提高商店的可信度。添加后,它们将如下显示在结账页面上:
A. 添加ShopBase代码到店铺
B. 编辑 ShopBase代码
ShopBase后台前往 线上店铺(Online Store) > 主题(Themes) > 定制(Customize)。
下拉菜单点击 Checkout。
选择 Custom scripts。
Custom javascript code 里添加以下代码。
如果只要添加 倒计器,请使用这段代码:
如果只要添加 Your order is reserved for ... minutes 这段,请使用这段代码。
如果只要添加 信任因素,请使用这段代码。
如果想添加 倒计器 和 信任因素,请使用这段代码。
可以更改内容,图片链接。请参考本文B条。
建议内容简短有力,显示在手机端不超过三行,这样助于提高转化率。
参考 将信任徽章添加到您的商店。
点击 Save 保存。
可以根据自己的要求进行修改代码,如修改内容,图片等。
复制上面代码。
访问 Unminify tool,将代码放在文字框,点击 Unminify。
代码解压缩后,请点击 Copy。
访问 JS Bin ,将已复制好的代码粘贴,修改代码。
这里来修改倒计器的内容和图片。
这里修改信任因素的内容与图片。
如果想要删除 Your order is reserved for ... minutes 这段,请将下图的代码段换成下面提供的代码。
编辑完成,按键 Ctrl (Windows) 或 Command (macOs) + A 全选,然后按键 Ctrl (Windows) 或 Command (macOs) + C 复制。
访问 Code Beautify ,将已复制好的代码粘贴到左边的文字框,点击 Minify FS。
代码解压缩后,点击 Output 的复制图标。
将代码放在ShopBase后台的 Put your custom JavaScript code here to add and change some content of Checkout pages (如A条的指南),点击 Save 保存。
将信任徽章添加到您的商店
将跟踪代码添加到感谢页面
主要内容
A. 添加ShopBase代码到店铺
B. 编辑 ShopBase代码
A. 添加ShopBase代码到店铺
ShopBase后台前往 线上店铺(Online Store) > 主题(Themes) > 定制(Customize)。
下拉菜单点击 Checkout。
选择 Custom scripts。
Custom javascript code 里添加以下代码。
如果只要添加 倒计器,请使用这段代码:
var mins=10,pSettings={highDemandImg:"https://img.btdmp.com/files/10038432/2019/06/19/0x500@flame_24-aa8a1.png",highDemandText:"An item you ordered is in very high demand. No worries, we have reserved your order so it doesn't run out of stock before checkout."};!function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var d=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=d,c}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}return function c(d){function b(f,h,c){var g;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(c=a({path:"/"},b.defaults,c)).expires){var k=new Date;k.setMilliseconds(k.getMilliseconds()+864e5*c.expires),c.expires=k}c.expires=c.expires?c.expires.toUTCString():"";try{g=JSON.stringify(h),/^[\{\[]/.test(g)&&(h=g)}catch(q){}h=d.write?d.write(h,f):encodeURIComponent(String(h)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),f=(f=(f=encodeURIComponent(String(f))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var i in c)c[i]&&(l+="; "+i,!0!==c[i]&&(l+="="+c[i]));return document.cookie=f+"="+h+l}f||(g={});for(var n=document.cookie?document.cookie.split("; "):[],o=/(%[0-9A-Z]{2})+/g,m=0;m<n.length;m++){var p=n[m].split("="),e=p.slice(1).join("=");this.json||'"'!==e.charAt(0)||(e=e.slice(1,-1));try{var j=p[0].replace(o,decodeURIComponent);if(e=d.read?d.read(e,j):d(e,j)||e.replace(o,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(r){}if(f===j){g=e;break}f||(g[j]=e)}catch(s){}}return g}}return b.set=b,b.get=function(a){return b.call(b,a)},b.getJSON=function(){return b.apply({json:!0},[].slice.call(arguments))},b.defaults={},b.remove=function(c,d){b(c,"",a(d,{expires:-1}))},b.withConverter=c,b}(function(){})});var defaultTime=60*mins,cookieCode="checkout_start_ts";function formatSecs(c){var a=Math.floor(c/60),b=c%60;return a<10&&(a="0"+a),b<10&&(b="0"+b),a+":"+b}function currentTSs(){return Math.round(new Date().getTime()/1e3)}function getStartTimestamp(){var b=currentTSs(),a=Cookies.get(cookieCode);return(void 0===a||b-a>=defaultTime)&&(a=currentTSs()),Cookies.set(cookieCode,a,{expires:1}),a}function addCountdownBlock(){setTimeout(function(){var b=document.getElementsByClassName("checkout-layout");if(!b||0!==b.length){var a=document.getElementById("order_count_down"),c=document.getElementsByClassName("os-order-number");if(c&&c.length>0)a&&(a.parentNode.removeChild(a),Cookies.remove(cookieCode));else if(!a){var d=currentTSs(),e=getStartTimestamp()-d+defaultTime,f='<div id="order_count_down"><div class="high_demand_text" style="width:100%;display:table"><div style="display:table-cell;vertical-align:middle"><img src="'+pSettings.highDemandImg+'"></div><div style="font-weight:bold;padding-left:5px; color: #545454;">'+pSettings.highDemandText+'</div></div><div stlye="margin-top:8px;"><div id="ct836" class="checkout_countdown" style="display:block;background:#fff5d2;padding:10px 20px;border:1px solid #fac444;font-size:14px;color:#2c2c2c;font-weight:bold;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; margin:5px 0px 20px 0px">Your order is reserved for <span id="time">'+formatSecs(e)+"</span> minutes!</div></div></div>";document.getElementsByClassName("main__content")[1].insertAdjacentHTML("afterbegin",f)}}},500)}function removeScriptOnLastStep(){setTimeout(function(){window.sbsdk.page.onContextUpdate(function(c){if("post_checkout"===c.type){var a=document.getElementById("why-us"),b=document.getElementById("order_count_down");a&&a.remove(),b&&b.remove()}})},600)}window.sbsdk.page.onContextUpdate(function(a){"post_checkout"!==a.type&&addCountdownBlock()}),removeScriptOnLastStep(),window.sbsdk.$on("page_load",function(){window.sbsdk.page.onContextUpdate(function(a){"post_checkout"!==a.type&&addCountdownBlock()}),removeScriptOnLastStep()}),setInterval(function(){var c=document.getElementById("time");if(c){var d=currentTSs(),a=getStartTimestamp(),b=a-d+defaultTime;b<=0&&(a=Math.round(date.getTime()/1e3),Cookies.set(cookieCode,a,{expires:1}),b=a-d+defaultTime),c.innerHTML=formatSecs(b)}},1e3)
如果只要添加 Your order is reserved for ... minutes 这段,请使用这段代码。
var mins=10,pSettings={highDemandImg:"",highDemandText:""};!function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var o=window.Cookies,n=window.Cookies=e();n.noConflict=function(){return window.Cookies=o,n}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var o=arguments[e];for(var n in o)t[n]=o[n]}return t}return function t(o){function n(t,i,r){var d;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(r=e({path:"/"},n.defaults,r)).expires){var c=new Date;c.setMilliseconds(c.getMilliseconds()+864e5*r.expires),r.expires=c}r.expires=r.expires?r.expires.toUTCString():"";try{d=JSON.stringify(i),/^[\{\[]/.test(d)&&(i=d)}catch(e){}i=o.write?o.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var a="";for(var s in r)r[s]&&(a+="; "+s,!0!==r[s]&&(a+="="+r[s]));return document.cookie=t+"="+i+a}t||(d={});for(var u=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,l=0;l<u.length;l++){var m=u[l].split("="),f=m.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var g=m[0].replace(p,decodeURIComponent);if(f=o.read?o.read(f,g):o(f,g)||f.replace(p,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(t===g){d=f;break}t||(d[g]=f)}catch(e){}}return d}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,o){n(t,"",e(o,{expires:-1}))},n.withConverter=t,n}((function(){}))}));var defaultTime=60*mins,cookieCode="checkout_start_ts";function formatSecs(e){var t=Math.floor(e/60),o=e%60;return t<10&&(t="0"+t),o<10&&(o="0"+o),t+":"+o}function currentTSs(){return Math.round((new Date).getTime()/1e3)}function getStartTimestamp(){var e=currentTSs(),t=Cookies.get(cookieCode);return(void 0===t||e-t>=defaultTime)&&(t=currentTSs()),Cookies.set(cookieCode,t,{expires:1}),t}function addCountdownBlock(){setTimeout((function(){var e=document.getElementsByClassName("checkout-layout");if(!e||0!==e.length){var t=document.getElementById("order_count_down"),o=document.getElementsByClassName("os-order-number");if(o&&o.length>0)t&&(t.parentNode.removeChild(t),Cookies.remove(cookieCode));else if(!t){var n=currentTSs(),i=getStartTimestamp()-n+defaultTime,r='<div id="order_count_down"><div class="high_demand_text" style="width:100%;display:table"><div style="display:table-cell;vertical-align:middle"><img src="'+pSettings.highDemandImg+'"></div><div style="font-weight:bold;padding-left:5px; color: #545454;">'+pSettings.highDemandText+'</div></div><div stlye="margin-top:8px;"><div id="ct836" class="checkout_countdown" style="display:block;background:#fff5d2;padding:10px 20px;border:1px solid #fac444;font-size:14px;color:#2c2c2c;font-weight:bold;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; margin:5px 0px 20px 0px">Your order is reserved for <span id="time">'+formatSecs(i)+"</span> minutes!</div></div></div>";document.getElementsByClassName("main__content")[1].insertAdjacentHTML("afterbegin",r)}}}),500)}function removeScriptOnLastStep(){setTimeout((function(){window.sbsdk.page.onContextUpdate((function(e){if("post_checkout"===e.type){var t=document.getElementById("why-us"),o=document.getElementById("order_count_down");t&&t.remove(),o&&o.remove()}}))}),600)}window.sbsdk.page.onContextUpdate((function(e){"post_checkout"!==e.type&&addCountdownBlock()})),removeScriptOnLastStep(),window.sbsdk.$on("page_load",(function(){window.sbsdk.page.onContextUpdate((function(e){"post_checkout"!==e.type&&addCountdownBlock()})),removeScriptOnLastStep()})),setInterval((function(){var e=document.getElementById("time");if(e){var t=currentTSs(),o=getStartTimestamp(),n=o-t+defaultTime;n<=0&&(o=Math.round(date.getTime()/1e3),Cookies.set(cookieCode,o,{expires:1}),n=o-t+defaultTime),e.innerHTML=formatSecs(n)}}),1e3);
如果只要添加 信任因素,请使用这段代码。
var mins=10,pSettings={whyUs:[{img:"https://img.shopbase.com/files/10038432/2019/06/19/0x500@money-back-6d3f8.png",title:"60-day Satisfaction Guarantee",text:"If you're not satisfied with our products we will rectify the situation immediately, no questions asked. Your satisfaction is very important to us."},{img:"https://img.shopbase.com/files/10038432/2019/06/19/0x500@mail-truck-64e12.png",title:"Over 34,245 successfully shipped orders",text:"We made as many happy customers as many orders we shipped. You simply have to join our big family."},]};!function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var d=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=d,c}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}return function c(d){function b(f,h,c){var g;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(c=a({path:"/"},b.defaults,c)).expires){var k=new Date;k.setMilliseconds(k.getMilliseconds()+864e5*c.expires),c.expires=k}c.expires=c.expires?c.expires.toUTCString():"";try{g=JSON.stringify(h),/^[\{\[]/.test(g)&&(h=g)}catch(q){}h=d.write?d.write(h,f):encodeURIComponent(String(h)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),f=(f=(f=encodeURIComponent(String(f))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var i in c)c[i]&&(l+="; "+i,!0!==c[i]&&(l+="="+c[i]));return document.cookie=f+"="+h+l}f||(g={});for(var n=document.cookie?document.cookie.split("; "):[],o=/(%[0-9A-Z]{2})+/g,m=0;m<n.length;m++){var p=n[m].split("="),e=p.slice(1).join("=");this.json||'"'!==e.charAt(0)||(e=e.slice(1,-1));try{var j=p[0].replace(o,decodeURIComponent);if(e=d.read?d.read(e,j):d(e,j)||e.replace(o,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(r){}if(f===j){g=e;break}f||(g[j]=e)}catch(s){}}return g}}return b.set=b,b.get=function(a){return b.call(b,a)},b.getJSON=function(){return b.apply({json:!0},[].slice.call(arguments))},b.defaults={},b.remove=function(c,d){b(c,"",a(d,{expires:-1}))},b.withConverter=c,b}(function(){})});var defaultTime=60*mins,cookieCode="checkout_start_ts";function formatSecs(c){var a=Math.floor(c/60),b=c%60;return a<10&&(a="0"+a),b<10&&(b="0"+b),a+":"+b}function currentTSs(){return Math.round(new Date().getTime()/1e3)}function getStartTimestamp(){var b=currentTSs(),a=Cookies.get(cookieCode);return(void 0===a||b-a>=defaultTime)&&(a=currentTSs()),Cookies.set(cookieCode,a,{expires:1}),a}function addAdBlock(){setTimeout(function(){var c=document.getElementsByClassName("checkout-layout");if(!(c&&0===c.length||document.getElementById("why-us"))){for(var a="",b=0;b<pSettings.whyUs.length;b++)a+='<div class="wyuscs" style="overflow: auto;margin-top: 16px;"><div class="wyuscs1" style="float: left;width: 20%">',a+='<img style="max-width: 64px;" src="'+pSettings.whyUs[b].img+'"></div>',a+='<div class="wyuscs2" style="float:right;width: 80%">',a+='<span style="font-weight: bold">'+pSettings.whyUs[b].title+"</span>",a+="<p>"+pSettings.whyUs[b].text+"</p></div></div>";var d='<div id="why-us" style="position:relative;padding:10px 0px;color: #666"><div class="wyustit" style="position:relative;z-index:1;text-align:center"><span style="background:#f2f2f2;padding:0 15px">Why choose us?</span><span style="position: absolute; height: 1px;width: 100%;top: 50%;background: #dfdfdf;left: 0;z-index: -1;"></span></div>'+a+"</div>";document.getElementsByClassName("order-summary__sections")[0].insertAdjacentHTML("afterend",d)}},500)}function removeScriptOnLastStep(){setTimeout(function(){window.sbsdk.page.onContextUpdate(function(c){if("post_checkout"===c.type){var a=document.getElementById("why-us"),b=document.getElementById("order_count_down");a&&a.remove(),b&&b.remove()}})},600)}window.sbsdk.page.onContextUpdate(function(a){"post_checkout"!==a.type&&addAdBlock()}),removeScriptOnLastStep(),window.sbsdk.$on("page_load",function(){window.sbsdk.page.onContextUpdate(function(a){"post_checkout"!==a.type&&addAdBlock()}),removeScriptOnLastStep()}),setInterval(function(){var c=document.getElementById("time");if(c){var d=currentTSs(),a=getStartTimestamp(),b=a-d+defaultTime;b<=0&&(a=Math.round(date.getTime()/1e3),Cookies.set(cookieCode,a,{expires:1}),b=a-d+defaultTime),c.innerHTML=formatSecs(b)}},1e3)
如果想添加 倒计器 和 信任因素,请使用这段代码。
var mins = 10;
var pSettings = {
highDemandImg: 'https://img.shopbase.com/files/10038432/2019/06/19/0x500@flame_24-aa8a1.png',
highDemandText: "An item you ordered is in very high demand. No worries, we have reserved your order so it doesn't run out of stock before checkout.",
// highDemandText: "An item you ordered is in very high demand.",
whyUs: [
{
img: 'https://img.shopbase.com/files/10038432/2019/06/19/0x500@money-back-6d3f8.png',
title: "60-day Satisfaction Guarantee",
text: "If you're not satisfied with our products we will rectify the situation immediately, no questions asked. Your satisfaction is very important to us.",
},
{
img: 'https://img.shopbase.com/files/10038432/2019/06/19/0x500@mail-truck-64e12.png',
title: "Over 34,245 successfully shipped orders",
text: "We made as many happy customers as many orders we shipped. You simply have to join our big family.",
}
]
};
!function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var o=window.Cookies,n=window.Cookies=e();n.noConflict=function(){return window.Cookies=o,n}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var o=arguments[e];for(var n in o)t[n]=o[n]}return t}return function t(o){function n(t,i,d){var r;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(d=e({path:"/"},n.defaults,d)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*d.expires),d.expires=s}d.expires=d.expires?d.expires.toUTCString():"";try{r=JSON.stringify(i),/^[\{\[]/.test(r)&&(i=r)}catch(e){}i=o.write?o.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var a="";for(var c in d)d[c]&&(a+="; "+c,!0!==d[c]&&(a+="="+d[c]));return document.cookie=t+"="+i+a}t||(r={});for(var l=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,p=0;p<l.length;p++){var f=l[p].split("="),m=f.slice(1).join("=");this.json||'"'!==m.charAt(0)||(m=m.slice(1,-1));try{var g=f[0].replace(u,decodeURIComponent);if(m=o.read?o.read(m,g):o(m,g)||m.replace(u,decodeURIComponent),this.json)try{m=JSON.parse(m)}catch(e){}if(t===g){r=m;break}t||(r[g]=m)}catch(e){}}return r}}return n.set=n,n.get=function(e){return n.call(n,e)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(t,o){n(t,"",e(o,{expires:-1}))},n.withConverter=t,n}(function(){})});var defaultTime=60*mins,cookieCode="checkout_start_ts";function formatSecs(e){var t=Math.floor(e/60),o=e%60;return t<10&&(t="0"+t),o<10&&(o="0"+o),t+":"+o}function currentTSs(){var e=new Date;return Math.round(e.getTime()/1e3)}function getStartTimestamp(){var e=currentTSs(),t=Cookies.get(cookieCode);return(void 0===t||e-t>=defaultTime)&&(t=currentTSs()),Cookies.set(cookieCode,t,{expires:1}),t}function addCountdownBlock(){setTimeout(function(){var e=document.getElementsByClassName("checkout-layout");if(!e||0!==e.length){var t=document.getElementById("order_count_down"),o=document.getElementsByClassName("os-order-number");if(o&&o.length>0)t&&(t.parentNode.removeChild(t),Cookies.remove(cookieCode));else if(!t){new Date;var n=currentTSs(),i=getStartTimestamp()-n+defaultTime,d='<div id="order_count_down"><div class="high_demand_text" style="width:100%;display:table"><div style="display:table-cell;vertical-align:middle"><img src="'+pSettings.highDemandImg+'"></div><div style="font-weight:bold;padding-left:5px; color: #545454;">'+pSettings.highDemandText+'</div></div><div stlye="margin-top:8px;"><div id="ct836" class="checkout_countdown" style="display:block;background:#fff5d2;padding:10px 20px;border:1px solid #fac444;font-size:14px;color:#2c2c2c;font-weight:bold;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px; margin:5px 0px 20px 0px">Your order is reserved for <span id="time">'+formatSecs(i)+"</span> minutes!</div></div></div>";document.getElementsByClassName("main__content")[1].insertAdjacentHTML("afterbegin",d)}}},500)}function addAdBlock(){setTimeout(function(){var e=document.getElementsByClassName("checkout-layout");if(!(e&&0===e.length||document.getElementById("why-us"))){for(var t="",o=0;o<pSettings.whyUs.length;o++)t+='<div class="wyuscs" style="overflow: auto;margin-top: 16px;"><div class="wyuscs1" style="float: left;width: 20%">',t+='<img style="max-width: 64px;" src="'+pSettings.whyUs[o].img+'"></div>',t+='<div class="wyuscs2" style="float:right;width: 80%">',t+='<span style="font-weight: bold">'+pSettings.whyUs[o].title+"</span>",t+="<p>"+pSettings.whyUs[o].text+"</p></div></div>";var n='<div id="why-us" style="position:relative;padding:10px 0px;color: #666"><div class="wyustit" style="position:relative;z-index:1;text-align:center"><span style="background:#f2f2f2;padding:0 15px">Why choose us?</span><span style="position: absolute; height: 1px;width: 100%;top: 50%;background: #dfdfdf;left: 0;z-index: -1;"></span></div>'+t+"</div>";document.getElementsByClassName("order-summary__sections")[0].insertAdjacentHTML("afterend",n)}},500)}function removeScriptOnLastStep(){setTimeout(function(){window.sbsdk.page.onContextUpdate(function(e){if("post_checkout"===e.type){var t=document.getElementById("why-us"),o=document.getElementById("order_count_down");t&&t.remove(),o&&o.remove()}})},600)}window.sbsdk.page.onContextUpdate(function(e){"post_checkout"!==e.type&&(addCountdownBlock(),addAdBlock())}),removeScriptOnLastStep(),window.sbsdk.$on("page_load",function(){window.sbsdk.page.onContextUpdate(function(e){"post_checkout"!==e.type&&(addCountdownBlock(),addAdBlock())}),removeScriptOnLastStep()}),setInterval(function(){var e=document.getElementById("time");if(e){var t=currentTSs(),o=getStartTimestamp(),n=o-t+defaultTime;n<=0&&(o=Math.round(date.getTime()/1e3),Cookies.set(cookieCode,o,{expires:1}),n=o-t+defaultTime),e.innerHTML=formatSecs(n)}},1e3);
可以更改内容,图片链接。请参考本文B条。
建议内容简短有力,显示在手机端不超过三行,这样助于提高转化率。
参考 将信任徽章添加到您的商店。
点击 Save 保存。
B. 编辑 ShopBase代码
可以根据自己的要求进行修改代码,如修改内容,图片等。
复制上面代码。
访问 Unminify tool,将代码放在文字框,点击 Unminify。
代码解压缩后,请点击 Copy。
访问 JS Bin ,将已复制好的代码粘贴,修改代码。
这里来修改倒计器的内容和图片。
这里修改信任因素的内容与图片。
如果想要删除 Your order is reserved for ... minutes 这段,请将下图的代码段换成下面提供的代码。
var d =
'<div id="order_count_down"><div class="high_demand_text" style="width:100%;display:table"><div style="display:table-cell;vertical-align:middle"><img src="' +
pSettings.highDemandImg +
'"></div><div style="font-weight:bold;padding-left:5px; color: #545454;">' +
pSettings.highDemandText +
'</div></div></div></div>'
编辑完成,按键 Ctrl (Windows) 或 Command (macOs) + A 全选,然后按键 Ctrl (Windows) 或 Command (macOs) + C 复制。
访问 Code Beautify ,将已复制好的代码粘贴到左边的文字框,点击 Minify FS。
代码解压缩后,点击 Output 的复制图标。
将代码放在ShopBase后台的 Put your custom JavaScript code here to add and change some content of Checkout pages (如A条的指南),点击 Save 保存。
关联页面
将信任徽章添加到您的商店
将跟踪代码添加到感谢页面
更新于: 09/11/2022
谢谢!