Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function processCartItems(Quote $cart, array $items): void
$quantity = (float)$item['quantity'];

if ($quantity <= 0.0) {
$this->cartItemRepository->deleteById((int)$cart->getId(), $itemId);
$cart->removeItem($itemId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After further analysis, your point is valid. The current GraphQL implementation using CartItemRepositoryInterface::deleteById() is inconsistent with the rest of Magento (REST API, Controllers) which all use Quote::removeItem().

But please add a comment explaining the fix.

} else {
$this->updateCartItem->execute($cart, $itemId, $quantity, $customizableOptions);
}
Expand Down