Order status JavaScript asset

Highlighted
New Member
1 0 0

Disclaimer: I'm not a developer.

I'm trying to insert a message once the customer chooses a shipping method; just like it says it here https://help.shopify.com/en/manual/orders/status-tracking/order-status-javascript-asset

 

My question is, can I just use it for all shipping methods? Any shipping method = same message.

The suggested code is: 

<script>
  {% if checkout.shipping_method.title == 'Pick-up at the store' %}
    Shopify.Checkout.OrderStatus.addContentBox(
     '<h2>Pick-up in store</h2>',
     '<p>We are open everyday from 9am to 5pm.</p>'
    )
  {% endif %}
</script>

 

If I want to display the same message, it is just like this then?

<script>
    Shopify.Checkout.OrderStatus.addContentBox(
     '<p>We are open everyday from 9am to 5pm.</p>'
    )
</script>

 Thanks! 

0 Likes