feat(cart): enhance item update functionality to support variant changes and improve cart editing policies

This commit is contained in:
2026-08-19 10:46:19 -03:00
parent 014b5bb012
commit 7cea8d3495
17 changed files with 514 additions and 52 deletions

View File

@@ -24,6 +24,7 @@ class StartCheckoutService
private readonly CatalogSelectionResolver $selections,
private readonly PurchaseItemSnapshotFactory $snapshots,
private readonly InsufficientStockMessageBuilder $stockMessages,
private readonly PurchaseResponseLoader $responses,
) {}
/** @param array<string, mixed> $purchaseData */
@@ -382,6 +383,6 @@ class StartCheckoutService
private function loadPurchase(Purchase $purchase): Purchase
{
return $purchase->load(['items.imageAttachment']);
return $this->responses->load($purchase);
}
}