Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
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!
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