本条还可参阅:
PayPal是一种通过互联网进行国际付款和汇款的中介服务。PayPal Guest Checkout允许客户使用信用卡支付而,不用登录PayPal账号完成交易。本文将指导您将PayPal Guest Checkout添加到结账页面。



指南

ShopBase后台前往 线上店铺(Online Store) > 主题(Themes) > 定制(Customize)


下拉菜单选择 Checkout


选择 Custom scripts



将以下代码添加到 Custom javascript code



//
sbsdk.page.onContextUpdate(function() {
  var count = 0;
  var readyCheckInterval = setInterval(function() {
    var elementText = document.querySelectorAll('.blank-slate > p')[0]
    if (typeof elementText !== 'undefined') {
      clearInterval(readyCheckInterval);
      elementText.innerHTML = '<p style="color:#3399cc;">After clicking "Complete order", you will be redirected to PayPal to complete your purchase securely.</p><p>You could pay <strong style="font-weight: 800 !important;">without a Paypal Account</strong> by clicking "Pay with Debit or Credit Card". </p><p>Again, don\'t worry!You don \'t need a Paypal account to make a payment.</p>'
    }
    if (count === 8) {
      clearInterval(readyCheckInterval);
    }
    count++;
  }, 500);
})

//
document.addEventListener("change", function(e) {
  var elementText = document.querySelectorAll('.blank-slate > p')[0]
  if (e.target.value === 'paypal-express' && e.target.checked && typeof elementText !== 'undefined') {
    elementText.innerHTML = '<p style="color:#3399cc;">After clicking "Complete order", you will be redirected to PayPal to complete your purchase securely.</p><p>You could pay <strong style="font-weight: 800 !important;">without a Paypal Account</strong> by clicking "Pay with Debit or Credit Card". </p><p>Again, do not worry! You do not need a Paypal account to make a payment.</p>'
  }
  if (e.target.value === 'faster-pay' && e.target.checked && typeof elementText !== 'undefined') {
    elementText.innerHTML = 'After clicking "Complete order", you will be redirected to FasterPay to complete your purchase securely.'
  }
})


此代码可用于单页结账和三页结账模式。
点击 Save 完成。

此功能仅适用于ShopBase店铺。

关联页面

将倒计时器和信任因素添加到结账页面
如何设置感谢页面的订单状态和运输政策
这篇文章有帮助吗?
取消
谢谢!