This commit is contained in:
ludo
2025-03-18 13:06:02 +01:00
parent 08fc49cb61
commit b214d8dc74
6 changed files with 21 additions and 9 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Repositories\Core\User;
use Cart;
use Illuminate\Support\Facades\Auth;
class ShopCart
{
@@ -95,6 +96,9 @@ class ShopCart
public static function get()
{
return Cart::session('_token');
$userId = Auth::guard('customer')->id();
$sessionKey = 'cart_'.sha1(static::class . ($userId ?? 'guest'));
return Cart::session($sessionKey);
}
}