Get App Configuration settings in Theme extension App embed block

riteshZrix
Shopify Partner
4 0 0

I created an Remix app in typescript and create theme app extension using shopify CLI. Theme app extension is for "App Embed Block"

I created a app settings form with some fields and save them in the prisma database according to store_id.

Now I want all the settings value in my "App Embed Block" javascript file.

Please let me know how I'll achieve this in Shopify Remix App.

Replies 5 (5)

Rishihuptech
Shopify Partner
589 105 119

Hello @riteshZrix 

Could you please provide more details on your requirements? Are you looking to obtain the schema settings for an App Embed Block in a JavaScript file, or is there something else you need?

 

 

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
riteshZrix
Shopify Partner
4 0 0

I found the solution. By creating an api and call that api on frontend.

 

Thanks

eaugustin2
Shopify Partner
3 0 0

Hey I'm in a similar position where I'd like to grab some settings from the prisma database. Could you walkthrough/explain a bit more how you created the api and were able to call it on the frontend?

riteshZrix
Shopify Partner
4 0 0

Hi @eaugustin2 

 

You just need to create an route and in that route Loader function load all values you want from prima database and return a json with all values and then create a proxy url for your app (Go to the partners dashboard and in your app configuration tab set proxy url) then fetch your route in which you load the values from prisma in the frontend js file using the proxy url.  {proxy_url + subpath_prefix+ subpath + your  route}

 

Thanks

Ritesh

eaugustin2
Shopify Partner
3 0 0

Hello @riteshZrix ,

 

Thank you so much for responding and breaking this down! I'll go try that!

 

Cheers!