I am in the process of building a marketing website for a client that has an existing Shopify store. They want the product details and checkout pages to remain on their Shopify store. On the new marketing site they want an indicator on the site to show a site visitor that they have items in their cart, if they have added some on the Shopify site, and a link to the checkout (on Shopify).
Using the Shopify SDK I can see how to get an existing checkout/cart to determine if the cart has items in it and also how to get a checkout link. What I need to figure out is how to connect the cart on the Shopify side to the marketing site. If I create a checkout/cart on the marketing site via the SDK, and then follow the checkout link, which directs me to the Shopify shop (running on a sub domain) everything looks good. However if I go to the main product catalogue on the Shopify site to continue adding items to the cart, it's an entirely different cart from the one I started on the main domain.
Is there a way to share a cart between the Shopify and another website? Both the marketing site and the Shopify site run on a common domain. I had thought possibly setting a cookie on the Shopify site that could share the checkout id, but it seems like there's a disconnect between the two sites.
Is this possible?
You can use `js-buy-sdk` to solve this issue vie sharing checkoutId between your shopify site & marketing website. (cookie, localstorage etc)
then on page navigation/change fetch added products/variants vie Storefront API on marketing website using checkoutId
this mean you may have to rework on shopify site if it is using AJAX API/liquid form
I am using the js-buy-sdk. I had assumed anything I started via the sdk (ie checkout) on the marketing site would be visible when I go to the shopify site subdomain but that doesn't seem to be the case.
It appears that the Private Shopify app I created to use with Sdk is a different sales channel from the main store channel. Is there a way to use the SDK with the store channel?
Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...By Gabe Jan 6, 2023
How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...By Skye Dec 30, 2022