CartSessionManager
class CartSessionManager implements CartSessionInterface (View source)
Methods
No description
Forget the current cart session.
{@inheritDoc}
Get the cart session key.
Return the current currency.
Return the current channel.
Return available shipping options for the current cart.
Create an order from a cart instance.
Create a new cart instance.
No description
Details
__construct(SessionManager $sessionManager, AuthManager $authManager, $channel = null, $currency = null, $cart = null)
No description
Cart|null
current()
Return the current cart.
void
forget()
Forget the current cart session.
manager()
{@inheritDoc}
void
associate(Cart $cart, Authenticatable $user, string $policy)
Associate a cart to a user.
void
use(Cart $cart)
Set the cart to be used for the session.
string
getSessionKey()
Get the cart session key.
CartSessionInterface
setChannel(Channel $channel)
Set the current channel.
CartSessionInterface
setCurrency(Currency $currency)
Set the current currency.
Currency
getCurrency()
Return the current currency.
Channel
getChannel()
Return the current channel.
Collection
getShippingOptions()
Return available shipping options for the current cart.
Order
createOrder(bool $forget = true)
Create an order from a cart instance.
protected Cart
createNewCart()
Create a new cart instance.
__call($method, $args)
No description