Documentation

CartService
in package

Table of Contents

Properties

$auth  : AuthComponent
$fake  : bool
$purchaseLock  : RedisLock|null
$redis  : Redis
$sessionLock  : RedisLock|null
$shoppingSession  : ShoppingSession|null|false

Methods

__construct()  : mixed
addAddon()  : ShoppingSession
addMultipleSubscriptions()  : mixed
addSubscription()  : ShoppingSession
drop()  : bool
get()  : ShoppingSession|null
getOrThrow()  : ShoppingSession
getPurchaseLock()  : RedisLock|null
getSessionLock()  : RedisLock|null
getShoppingSessionId()  : mixed
init()  : ShoppingSession
initFake()  : ShoppingSession
lockPurchase()  : mixed
lockSession()  : mixed
setCoupons()  : mixed
setOffer()  : mixed
userHasCart()  : bool
commit()  : mixed
getPurchaseLockKey()  : mixed

Properties

Methods

addMultipleSubscriptions()

public addMultipleSubscriptions(mixed $subscriptions) : mixed
Parameters
$subscriptions : mixed

getShoppingSessionId()

public getShoppingSessionId() : mixed

lockPurchase()

public lockPurchase([int $ttl = 3000 ]) : mixed
Parameters
$ttl : int = 3000

lockSession()

public lockSession([int $ttl = 3000 ]) : mixed
Parameters
$ttl : int = 3000

setCoupons()

public setCoupons(array<string|int, mixed> $coupons) : mixed
Parameters
$coupons : array<string|int, mixed>

setOffer()

public setOffer(mixed $offer) : mixed
Parameters
$offer : mixed

userHasCart()

public userHasCart() : bool
Return values
bool

getPurchaseLockKey()

private getPurchaseLockKey() : mixed

        
On this page

Search results