Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: How can I display dynamic data in Script Tag API

How can I display dynamic data in Script Tag API

yedla_dinesh
Shopify Partner
11 0 2

I’ve recently building the Shopify app and am stuck in the middle. I have loaded the script tag at the store and displayed the static data but how’d like to change the text and make it dynamic (like getting data from DB and loading JSON data in js file).

 

Can you help me out with how I can do this? I just need suggestions.

Thanks

Shopify Expert
Helping thousands of @Shopify store owners to achieve sustainable growth & increase revenue 2-3x 
Replies 3 (3)

getInfoSol
Shopify Partner
91 6 22

Use XHR or AJAX request to fetch  data via RESTful api from server in js file.

If helpful, Please Like and Accept the solution.
Increase your Shopify store conversion rate with : getReviews app for Product Reviews, Rating, UGC, Social share testimonials
Support Email : support@getinfosol.com
yedla_dinesh
Shopify Partner
11 0 2

Okay, thanks.
But I think RestAPI will take some time. Because after loading the script tag then I hit an API after getting the response. I think it's an appropriate solution.

Any other suggestions?

Shopify Expert
Helping thousands of @Shopify store owners to achieve sustainable growth & increase revenue 2-3x 
syedusama076
Shopify Partner
7 0 5

Hey bro!
got any solution or not?

SyeDUsamABukharI