Skip to main content

Customise text on your checkout with JavaScript code

With custom JavaScript, you can tweak texts to better match your brand voice and style

Bryan Schoenmaker avatar
Written by Bryan Schoenmaker
Updated over a week ago

You can design your Plug&Pay checkouts in countless ways to put your own spin on them. However, you won't be able to just simply customise some parts of your checkout page. Think of terms like Order summary or One-off additional costs.

❗️Please note: This is an advanced feature. We do not provide support for custom scripts.

Custom scripts are part of Plug&Pay Premium & Ultimate. Lite users need to upgrade to Premium or Ultimate in order to use this feature.


Find and copy the text you want to change

Suppose you do not want to use the word Order summary and would rather display your own wording.

To get started, you first need to select and copy the element using your browser tools.
1) Highlight the text you want to change
2) Right-click on it and choose Inspect Element.

A large panel will open. In this panel, right-click the highlighted section again and select Copy > Copy element. This copied HTML element is what you will need to target with you JavaScript code.


Retrieving the JavaScript code

Now that you have copied the element, it is time to generate the JavaScript code. The easiest way to do this is by using AI. In this example, we will use ChatGPT.

Paste the copied element into ChatGPT and ask it to create a JavaScript code that changes the term. In this case we want to replace Order summary with something else.

Copy the code and go to the checkout where you want to apply it. You can also add the code to all your checkouts, by going to Settings > Custom scripts

You can add the code to a single checkout by navigating to the Advanced tab:

❗️Please note: Make sure your code start with <script> and ends with </script>. If those tags are missing, add them yourself.


Modifying the text

To customise the text, simply change the part of the code labelled 'Your Custom Text'. For example, I have changed the text 'Order summary' in the code below to 'Shopping Basket'.

Save and preview your checkout page to see your update in action!


My code is not working?

If your script is not doing what is should, here are a few things to check:

  • Make sure your code starts with '<script>' and ends with '</script>'

  • Double check that you have copied the correct element from your checkout page

  • Ensure you have updated the right text in the JavaScript code provided by ChatGPT

Still stuck? Let ChatGPT know the code did not work. It will provide you with an alternative version to try.

Did this answer your question?