interface CartSessionInterface (View source)

Methods

Cart|null
current()

Return the current cart.

void
forget()

Forget the current cart session.

void
associate(Cart $cart, Authenticatable $user, string $policy)

Associate a cart to a user.

void
use(Cart $cart)

Use the given cart and set to the session.

string
getSessionKey()

Return the session key for carts.

setChannel(Channel $channel)

Set the cart session channel.

setCurrency(Currency $currency)

Set the cart session currency.

getCurrency()

Return the current currency.

getChannel()

Return the current channel.

Details

Cart|null current()

Return the current cart.

Return Value

Cart|null

void forget()

Forget the current cart session.

Return Value

void

void associate(Cart $cart, Authenticatable $user, string $policy)

Associate a cart to a user.

Parameters

Cart $cart
Authenticatable $user
string $policy

Return Value

void

void use(Cart $cart)

Use the given cart and set to the session.

Parameters

Cart $cart

Return Value

void

string getSessionKey()

Return the session key for carts.

Return Value

string

CartSessionInterface setChannel(Channel $channel)

Set the cart session channel.

Parameters

Channel $channel

Return Value

CartSessionInterface

CartSessionInterface setCurrency(Currency $currency)

Set the cart session currency.

Parameters

Currency $currency

Return Value

CartSessionInterface

Currency getCurrency()

Return the current currency.

Return Value

Currency

Channel getChannel()

Return the current channel.

Return Value

Channel