Public Member Functions | |
getReservations () | |
getReservedAmount ($sArticleId) | |
reserveBasket (oxBasket $oBasket) | |
commitArticleReservation ($sArticleId, $dAmount) | |
discardArticleReservation ($sArticleId) | |
discardReservations () | |
discardUnusedReservations ($iLimit) | |
getTimeLeft () | |
renewExpiration () | |
Protected Member Functions | |
_getReservationsId () | |
_loadReservations ($sBasketId) | |
_getReservedItems () | |
_basketDifference (oxBasket $oBasket) | |
_reserveArticles ($aBasketDiff) | |
Protected Attributes | |
$_oReservations = null | |
$_aCurrentlyReserved = null |
Basket reservations handler class
Definition at line 7 of file oxbasketreservation.php.
oxBasketReservation._basketDifference | ( | oxBasket $ | oBasket | ) | [protected] |
compute difference of reserved amounts vs basket items
oxBasket | $oBasket basket object |
Definition at line 119 of file oxbasketreservation.php.
oxBasketReservation._getReservationsId | ( | ) | [protected] |
return the ID of active resevations user basket
Definition at line 18 of file oxbasketreservation.php.
oxBasketReservation._getReservedItems | ( | ) | [protected] |
return currently reserved items in an array format array (artId => amount)
Definition at line 75 of file oxbasketreservation.php.
oxBasketReservation._loadReservations | ( | $ | sBasketId | ) | [protected] |
load reservation or create new reservation oxuserbasket
string | $sBasketId basket id for this userbasket |
Definition at line 35 of file oxbasketreservation.php.
oxBasketReservation._reserveArticles | ( | $ | aBasketDiff | ) | [protected] |
reserve articles given the basket difference array
array | $aBasketDiff basket difference array |
Definition at line 143 of file oxbasketreservation.php.
oxBasketReservation.commitArticleReservation | ( | $ | sArticleId, | |
$ | dAmount | |||
) |
commit reservation of given article amount deletes this amount from active reservations userBasket, update sold amount
string | $sArticleId article id | |
double | $dAmount amount to use |
Definition at line 183 of file oxbasketreservation.php.
oxBasketReservation.discardArticleReservation | ( | $ | sArticleId | ) |
discard one article reservation return the reserved stock to article
string | $sArticleId article id |
Definition at line 208 of file oxbasketreservation.php.
oxBasketReservation.discardReservations | ( | ) |
oxBasketReservation.discardUnusedReservations | ( | $ | iLimit | ) |
periodic cleanup: discards timed out reservations even if they are not for the current user
int | $iLimit limit for discarding (performance related) |
Definition at line 246 of file oxbasketreservation.php.
oxBasketReservation.getReservations | ( | ) |
get reservations collection
Definition at line 55 of file oxbasketreservation.php.
oxBasketReservation.getReservedAmount | ( | $ | sArticleId | ) |
return currently reserved amount for an article
string | $sArticleId article id |
Definition at line 103 of file oxbasketreservation.php.
oxBasketReservation.getTimeLeft | ( | ) |
return time left (in seconds) for basket before expiration
Definition at line 277 of file oxbasketreservation.php.
oxBasketReservation.renewExpiration | ( | ) |
renews expiration timer to maximum value
Definition at line 297 of file oxbasketreservation.php.
oxBasketReservation.reserveBasket | ( | oxBasket $ | oBasket | ) |
reserve given basket items
oxBasket | $oBasket basket object |
Definition at line 168 of file oxbasketreservation.php.
oxBasketReservation.$_aCurrentlyReserved = null [protected] |
Definition at line 10 of file oxbasketreservation.php.
oxBasketReservation.$_oReservations = null [protected] |
Definition at line 9 of file oxbasketreservation.php.