/

August 5, 2024

How To Show Alert Message In Shopify Using Javascript

In this blog, We apply basic javascript code in the Shopify theme and just show the pop-up message through javascript, so let’s see how it can be done.

 

Step 1: Go to Shopify Admin and Follow these steps Online store > Themes > Edit code

 

Step 2: Search from the top search bar or search Template folder and search the Theme.liquid file

 

Step 3: then after searching, the </body> tag and paste the below code before the tag and save the file.

<script>

alert(‘hello’);

</script>

 

Step 4: Refresh your preview page and see the alert message look like the below image.

 

From the same category