Create your own ecommerce website and start selling successfully with ShopWired today

Create your ecommerce website on ShopWired today.
Start today with 14 days free

Create your own ecommerce website and start selling successfully with ShopWired today

Create your ecommerce website on ShopWired today.
Start today with 14 days free

Overriding the normal platform success message

Theme Customisations - Coding
2nd February 2021

Before you proceed:
The following article contains information that requires you to have some prior knowledge about coding in order to correctly implement the proposed change to your theme. If done incorrectly alterations made to your theme’s code can negatively impact your website causing visual and performance issues. Therefore, we strongly recommend that you only undertake this effort if you are completely confident that you know what you’re doing. If you have no coding experience at all, aren’t entirely comfortable following the instructions in this article or if you simply don’t understand the instructions then we recommend you instead contact our partners, Coding Masters, who will complete the work for you for a set fee.


The platform will respond with a success message when certain actions on a website are completed. For example, when the contact form is submitted the platform will output a message:

Thank you for your enquiry - we will respond to you as soon as possible

There maybe times when you would like to change the normal platform message and the guidance below explains how this is done.


The platform message maybe outputted either directly on the page file that renders the success message, or alternatively it might be constructed in a macro.

You'll either be able to find the platform message in a shopwired.twig file contained within a macros folder in your theme, or alternatively it will be contained in a template twig view like page.twig.

The variable to output the platform message is {{ global.info_message|raw }}

Once you've located where the variable is placed in your theme you can follow the instructions to change the default platform message.


You'll first need to record the exact platform message that you'd like to change. To do this, perform the action on the website that outputs the message and record the exact wording of the message, e.g.

Thank you for your enquiry - we will respond to you as soon as possible

Where the {{ global.info_message|raw }} variable is located you'll need to surround this with an if statement, e.g.

{% if global.info_message %}
       <div id="{{ id|default('shopwired-info-message') }}">
             {{ global.info_message|raw }}
       </div>
{% endif %}

becomes...

{% if global.info_message %}
      <div id="{{ id|default('shopwired-info-message') }}">
            {% if global.info_message == 'Thank you for your enquiry - we will respond to you as soon as possible' %}
                   We've got your message and we'll get back to you
            {% else %}
                  {{ global.info_message|raw }}
            {% endif %}
        </div>
{% endif %}