new: keep cart when login in

This commit is contained in:
Valentin Lab
2025-10-04 14:13:48 +02:00
parent f2a87f4d12
commit d88b8c8a70
3 changed files with 103 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Shop\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Shop\RegisterCustomer;
use App\Repositories\Core\User\ShopCart;
use App\Repositories\Shop\CustomerSaleChannels;
use App\Repositories\Shop\CustomerAddresses;
use App\Repositories\Shop\Customers;
@@ -33,6 +34,7 @@ class RegisterController extends Controller
$user = $this->create($request->all());
$this->guard()->login($user);
ShopCart::migrateGuestCartToUser();
return $request->wantsJson()
? new JsonResponse([], 201)