From a7dba4dc105ef4a6327f238aaef99809f28a6f91 Mon Sep 17 00:00:00 2001 From: ncoronel Date: Wed, 1 Jul 2026 12:38:46 -0300 Subject: [PATCH] feat: implement CartService to manage cart lifecycle and guest identity resolution --- app/Domains/Cart/Services/CartService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Domains/Cart/Services/CartService.php b/app/Domains/Cart/Services/CartService.php index 4e05395..52f63c6 100644 --- a/app/Domains/Cart/Services/CartService.php +++ b/app/Domains/Cart/Services/CartService.php @@ -14,13 +14,13 @@ class CartService { public function show(Tenant $tenant, Request $request): Cart { - $identity = $this->resolveIdentity($request); + $resolvedIdentity = $this->resolveIdentity($request); - if ($identity === null) { + if ($resolvedIdentity === null) { return $this->makeEmptyCart($tenant); } - $cart = $this->findCart($tenant, $identity); + $cart = $this->findCart($tenant, $resolvedIdentity['identity']); if ($cart === null) { return $this->makeEmptyCart($tenant);