Skip to content

fix(storefront): complete the cart line-item chain - #32

Merged
roncodes merged 1 commit into
mainfrom
fix/storefront-cart-line-item
Aug 11, 2026
Merged

roncodes merged 1 commit into
mainfrom
fix/storefront-cart-line-item

Conversation

@roncodes

Copy link
Copy Markdown
Member

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 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 Cart now captures {{line_item_id}} from items[0].id of the cart it returns, and both requests use {{cart_id}}/{{line_item_id}}.

Two more things in the same request

  • Update item in Cart had no body at all, so the PUT updated nothing even when it reached the endpoint. It now sends {"quantity": 2} — CartController::update() reads quantity, variants, addons and scheduled_at, leaving omitted fields unchanged.
  • 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 actually does.

This is the tail of the chain Add Item to Cart unblocked in fleetbase/fleetbase#598; that one now passes and these two were the only cart requests still failing behind it.

🤖 Generated with Claude Code

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>
@roncodes
roncodes merged commit 4572eb0 into main Aug 11, 2026
1 check passed
@roncodes
roncodes deleted the fix/storefront-cart-line-item branch August 11, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant