Repository navigation
fix(storefront): complete the cart line-item chain - #32
Merged
Merged
Conversation
Update item in Cart and Remove item from cart addressed
/carts/{id}/{line_item_id}. Single braces are not Postman variables, so both
requested literal placeholders and answered "Invalid cart item provided to
cart!". Nothing captured a line item id anywhere either — and it is the cart
ITEM id (cart_item_*), not the product id, so {{product_id}} would not have
worked.
Add Item to Cart now captures {{line_item_id}} from items[0].id of the cart it
returns, and both requests use {{cart_id}}/{{line_item_id}}.
Update item in Cart also had no body, so the PUT updated nothing. It now sends
{"quantity": 2}, which is what CartController::update reads.
Its description read "You can update all properties of the Zone." — copy-pasted
from the Zones collection into published Storefront documentation. Replaced with
what the endpoint does.
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.
Update item in CartandRemove item from cartaddressed/carts/{id}/{line_item_id}. Single braces are not Postman variables, so both requested literal placeholders and answered "Invalid cart item provided to cart!".Nothing captured a line item id anywhere in the collection either — and it is the cart item id (
cart_item_*), not the product id, so{{product_id}}would not have worked as a substitute.Add Item to Cartnow captures{{line_item_id}}fromitems[0].idof the cart it returns, and both requests use{{cart_id}}/{{line_item_id}}.Two more things in the same request
Update item in Carthad no body at all, so the PUT updated nothing even when it reached the endpoint. It now sends{"quantity": 2}—CartController::update()readsquantity,variants,addonsandscheduled_at, leaving omitted fields unchanged.This is the tail of the chain
Add Item to Cartunblocked in fleetbase/fleetbase#598; that one now passes and these two were the only cart requests still failing behind it.🤖 Generated with Claude Code