Kapil Kumar
Kapil Kumar

Reputation: 3

why additional script not working in shopify?

I want to add some additional content under shipping method on Shopify checkout page. same like this. My ref Site https://www.thegldshop.com

enter image description here

For this, I found this article and added this script

https://help.shopify.com/en/manual/orders/status-tracking/customize-order-status/show-content-based-on-shipping-method

{% if checkout.shipping_method.title != 'Pick-up at the store' %}
      Shopify.Checkout.OrderStatus.addContentBox(
        `<p>Okay, we're ready for you to collect your products from 17 Mapple Crescent, Toronto. Our store is open 9:00 to 5:00 every day.</p>`
      )
    {% endif %}

But still not working for me. Here is my website url

https://hypeyourbeast.com/

Upvotes: 0

Views: 3568

Answers (2)

Chris Lattner
Chris Lattner

Reputation: 1

You can modify the Thank You / Orders page in checkout without Shopify Plus. Plus is required to edit checkout for any step prior to "thank you".

Add tags around your code in the additional scripts area. This code worked for me:

<script> 
  // DEBUG {{ checkout.shipping_method.title }} has been used
   {% if checkout.shipping_method.title != 'Pick-up at the store' %}
     Shopify.Checkout.OrderStatus.addContentBox(
       `<p>Added content box {{ checkout.shipping_method.title }}</p>`
     )
   {% endif %}
</script>

Upvotes: 0

Tapan sain
Tapan sain

Reputation: 41

In Shopify, You will need Shopify plus account to do any change on the checkout page. Without a Shopify Plus account, you can't change anything on the checkout page.

Upvotes: 0

Related Questions