Focuses on API authentication, access scopes, and permission management.
Hi,
I'm looking for some advice / direction on using the Storefront API to amend line items in a customer's cart.
https://shopify.dev/custom-storefronts/cart#retrieve-a-cart
What I'd like to understand better is how to retrieve a cart ID like the one referenced in the link for a pre-existing cart. I'm aware that once an item is added to a customer's cart, that there is then a cart token that can be retrieved from the cart.js API on the front end. Is it possible to use this cart token to retrieve the GraphQL cart ID mentioned in the link above?
For better context of the functionality we are trying to achieve, we want to be able to add an item to cart on the store front end with multiple custom properties, pass that item to our own API and use those properties to calculate a new line item price and finally amend the line item's price in the cart.
I've already spoken with Shopify Support and they pointed me in this direction, so any help or advice is greatly appreciated.
I know this is an old thread, but if anyone can help with this it would be great also looking on how to get the cart.id with just access to a cart token.
Hey Jonny, were you able to get an answer to this?
i'm guessing still nothing? 😅