We're on Plus and have a customized checkout.liquid wherein we offer an in-checkout product upsell. This works by using cart.js endpoints to add the product/variant to cart. However, we noticed when creating and redirecting to checkouts created using the Storefront API, cart.js still updates the *main site cart* and not the checkout cart (i.e. line items).
I don't see in the docs how to change the checkout/cart contents for the *current* checkout. Any insight is appreciated.
Have you looked at the the checkoutLineItemsReplace (/Add/Remove/Update) mutations in the Storefront API yet?
Any ideas? This is specifically to be able to manipulate the cart/checkout you would access by browsing our storefront, *not* a checkout created via API. The cart.js blocks cross origin requests even from a subdomain of our store, so that won't work. Looking forward to your reply.
I don't believe this is possible. Check out this similar forum thread: https://community.shopify.com/c/Shopify-APIs-SDKs/How-do-I-use-the-AJAX-API-in-a-headless-Shopify-Re...