ShopBase Help Center

Explore How-To's and learn eCommerce best practices from our knowledge base.

Home Add instruction to use PayPal Guest checkout in Checkout Page

Add instruction to use PayPal Guest checkout in Checkout Page

This article is also available in:

PayPal is a simple, fast payment gateway to keep your customers ‘s checkout process smoothly. In this section, we will introduce you to a short instruction on how to use PayPal Guest Checkout in your Checkout Page so you can improve your store management as below.

Step by Step Tutorial

From your ShopBase admin, go to Online store > Themes and click Customize next to your current theme.
Click on the dropdown menu and select Checkout page.
Select Custom scripts section.
Add the script below to the Custom javascript code section.
//
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.'
  }
})

This custom script works for both One page checkout and 3-step checkout.

Click Save once finished.

This set up is only available for ShopBase stores.