What's your biggest current challenge? Have your say in Community Polls along the right column.

How to pass data from database apps to theme app extensions?

Solved

How to pass data from database apps to theme app extensions?

AndyHung
Shopify Partner
63 0 16

I am trying to figure out how to pass data between database apps to theme app extensions. In backend, Merchant can create, edit and delete data and it will update database. How can I pass data from Database to Theme App Extension to update latest data to display on Online Store?

 

Thank You Very Much! 

Accepted Solution (1)

StoreWatchers
Trailblazer
205 30 37

This is an accepted solution.

Hello @AndyHung,

 

Greetings from the Store Watchers Support Team! Happy to help you today.

 

One of the best ways is to save data in DB as well as Shopify metafield and get value in app extension using liquid.

 

You may also use the proxy to make API calls if the Shopify Partner has enabled app proxy for you. Suppose you set apps/testapp as your proxy, for instance. You can use this proxy to make API calls to the server, such as /apps/testapp/api/getdata.

 

Please don't hesitate to reach out if you require further assistance.

StoreWatchers - Automate testing for your Shopify store in seconds


If you find my reply helpful, please hit Like and Mark as Solution
Visit us: App Store | Website | FAQs

View solution in original post

Replies 6 (6)

StoreWatchers
Trailblazer
205 30 37

This is an accepted solution.

Hello @AndyHung,

 

Greetings from the Store Watchers Support Team! Happy to help you today.

 

One of the best ways is to save data in DB as well as Shopify metafield and get value in app extension using liquid.

 

You may also use the proxy to make API calls if the Shopify Partner has enabled app proxy for you. Suppose you set apps/testapp as your proxy, for instance. You can use this proxy to make API calls to the server, such as /apps/testapp/api/getdata.

 

Please don't hesitate to reach out if you require further assistance.

StoreWatchers - Automate testing for your Shopify store in seconds


If you find my reply helpful, please hit Like and Mark as Solution
Visit us: App Store | Website | FAQs
AndyHung
Shopify Partner
63 0 16

Hello @StoreWatchers ,

 

Thank you for your solution. I think I can use this solution "One of the best ways is to save data in DB as well as Shopify metafield and get value in app extension using liquid." (because I think I only get data from database, don't need send from front-end to server).

 

But what can I save Shopify metafield in multiple products/collections by GraphQl? 

StoreWatchers
Trailblazer
205 30 37

@AndyHung 

 

Glad to know it helped you find a solution. 

 

Hello @AndyHung,

 

You can save any relevant data in Shopify metafield. You can save related product data, product review data, part numbers anything like that for each product/collection.

 

On the shop metafield, you can save settings like the app is enabled/disabled.

 

You can read in detail about data type info of Shopify metafield here https://shopify.dev/apps/metafields/types#supported-types.


Regards,

Store Watchers Support Team

StoreWatchers - Automate testing for your Shopify store in seconds


If you find my reply helpful, please hit Like and Mark as Solution
Visit us: App Store | Website | FAQs
AndyHung
Shopify Partner
63 0 16

Hi @StoreWatchers ,

 

Thank you very much for your support. 

 

Sorry, my second question is not clear. I tried to find solution: how to bulk update metafield with multiple products by graphQL instead of updating metafield each product by using mutation MetafieldsSet and variables 'ownerId' is productID. 

 

How can I do that? Please help me this problem. Thank you so much.

 

 

 

 

laoyingpeng
Shopify Partner
6 0 2

How can I save data in Shopify metafield?

GenDesu
Shopify Partner
1 0 0