Start a conversation

Add an alert on Checkout page

Go to Admin panel > Storefront > Script Manager. Add a script with the value

Name of script: Alert on Checkout page

Location on page: Footer

Select pages where script will be added: Checkout

Script type: Script

Script contents:

    (function() {
        var alert = 'YOUR ALERT CONTENT';

        var elm = document.createElement('div');
        elm.setAttribute('class', 'layout'); = '1.5rem'; = '0';
        elm.innerHTML = '<div class="alertBox alertBox--warning">' + alert + '</div>';

        var heading = document.querySelector('.page-heading');

        if (!heading) {
            heading = document.querySelector('header');

        heading.parentNode.insertBefore(elm, heading.nextElementSibling);

see screenshot 

Choose files or drag and drop files
Was this article helpful?
  1. Papathemes

  2. Posted