How do I create a script tag and display an announce bar in my Shopify app?

How do I create a script tag and display an announce bar in my Shopify app?

Deep0617
Shopify Partner
28 0 6

I am beginner of shopify app developer .I have just create shopify app that provide functionality of announce bar in shopify store.

but i don`t know how i create script tag and how announce bar display in online store and what api i use ?

to run app and how create theme app extension ? @Shopify  @Nodes 

Replies 10 (10)

HappyPoints
Shopify Partner
76 8 27

Hi @Deep0617 ,

 

For announce bar app, you only need create a public app that have theme app extension. It will help you inject JS file into storefront and then you can detect the position and display the bar by JS code. If you want to get data from your app in storefront, you can call API directly to your app domain or using Shopify proxies.

 

You can refer to this Getting started with theme app extensions  documentation to start building theme app extensions.

 

Hope it helps.

 

HappyPoints | Shopify Expert in Store Development and Growth
If my reply is helpful and solved your question, please Mark It As Solution and Like to let me know!
Looking for a solution to increase sales? Install app DISCOS now!
Want to know who we are? Check out our website.
Deep0617
Shopify Partner
28 0 6

Thanks For reply

 

Deep0617
Shopify Partner
28 0 6

@HappyPoints 

i have some of this file how i do add theme app extension

 

 

HappyPoints
Shopify Partner
76 8 27

@Deep0617 

Those files are for embed your app in the Shopify admin. You can follow this article Create an app to create a Node.js embedded app. 

After that, you can refer to Getting started with theme app extensions  documentation to start building theme app extensions inside your embed app. 

 

HappyPoints | Shopify Expert in Store Development and Growth
If my reply is helpful and solved your question, please Mark It As Solution and Like to let me know!
Looking for a solution to increase sales? Install app DISCOS now!
Want to know who we are? Check out our website.
Deep0617
Shopify Partner
28 0 6

thank you for your help

 

Deep0617
Shopify Partner
28 0 6

tnx but i need to provide merchant to enter the message and textcolor and background color  and that values are stored and when his press active button announce bar display in their store,

i have try to create but how store the user input value i don't know 

Deep0617
Shopify Partner
28 0 6

how to solve this error, what API use? 

error in zip file.......

1080
Shopify Partner
301 9 66

@Deep0617   i can help on the your Error let me know if you still facing  the issue 

1080
Shopify Partner
301 9 66

have you storing the data into database ?

Deep0617
Shopify Partner
28 0 6

@1080Thanks you , but that work complete.