Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Send Data From Web App To Shopify Theme Cart And Checkout

Send Data From Web App To Shopify Theme Cart And Checkout

markushrvst
Shopify Partner
3 0 1

Hi all,

 

Curious, is there a way to connect and send data from a web app built with React (using the Storefront API), to the store's theme cart page and then checkout?

 

We were requested to build a product customizer web app experience with some high level functionality, but also have a theme so the client can use the OS2.0 functionality for inner pages.

 

Essentially, a customer starts on the theme, customizes the product in the web app, and then finishes their purchasing experience back on the theme.

 

Thanks!

Reply 1 (1)

Liam
Community Manager
3108 344 889

Hi Markushrvst,

 

The flow you've described should be possible with the the Storefront API so you can use a react based web app alongside a native Shopify cart (and other pages). The general process would be to make an API call to the Storefront API to add the customized product to the cart, when the customer completes the customization process in the web app,. You can use the `checkoutLineItemsAdd` mutation to add the product with the desired customization options to the cart. Then you'd redirect the customer to the theme's cart page by providing a link or use a programmatic navigation method to ensure the customer lands on the correct page within the theme.

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog