fix(storefront): capture the cart id - #43
Merged
Merged
Conversation
Nothing in the collection ever set {{cart_id}}, so every request addressing a cart
sent the literal placeholder. The run shows it plainly:
POST /storefront/v1/carts/%7B%7Bcart_id%7D%7D/product_nhunqzhu2g
Add Item to Cart, Update item in Cart, Remove item from cart, Empty cart, Delete
Cart and the checkout requests that price the cart all address it.
Retrieve or Create Cart returns the cart it retrieved or created, and runs first,
so it is the source.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing in the collection ever set
{{cart_id}}, so every request addressing a cart sent the literal placeholder. The run shows it plainly:Note the product resolved and the cart did not — which is why the endpoint answered "Invalid product provided" rather than anything about the cart, and why this took a while to spot.
Add Item to Cart,Update item in Cart,Remove item from cart,Empty cart,Delete Cartand the checkout requests that price the cart all address it.Retrieve or Create Cartreturns the cart it retrieved or created and runs first, so it is the source.🤖 Generated with Claude Code