app/maguttiCms/Domain/Store/StoreHelperMck.class.php
// open a new cart and set it to session
open a new cart and set it to session
open a new cart and set it to session
public static function cartCreate()
	{
		if ($user = Auth::user())
			$cart = Cart::create(['user_id' => $user->id]);
		else
			$cart = Cart::create([]);
		$token = Str::random(56).'$'.$cart->id;
        $cart->update(['token' => $token]);
		self::setSessionCart($cart);
		return $cart;
	}
public static function cartCreate ( ) { if ( $ user = Auth :: user ( ) ) $ cart = Cart :: create ( [ 'user_id' => $ user -> id ] ) ; else $ cart = Cart :: create ( [ ] ) ; $ token = Str :: random ( 56 ) . '$' . $ cart -> id ; $ cart -> update ( [ 'token' => $ token ] ) ; self :: setSessionCart ( $ cart ) ; return $ cart ; }
open a new cart and set it to session
open a new cart and set it to session