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 134 of file oxbasketreservation.php.
oxBasketReservation._getReservationsId | ( | ) | [protected] |
return the ID of active resevations user basket
Definition at line 29 of file oxbasketreservation.php.
oxBasketReservation._getReservedItems | ( | ) | [protected] |
return currently reserved items in an array format array (artId => amount)
Definition at line 88 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 47 of file oxbasketreservation.php.
oxBasketReservation._reserveArticles | ( | $ | aBasketDiff | ) | [protected] |
reserve articles given the basket difference array
array | $aBasketDiff basket difference array |
Definition at line 157 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 192 of file oxbasketreservation.php.
oxBasketReservation.discardArticleReservation | ( | $ | sArticleId | ) |
discard one article reservation return the reserved stock to article
string | $sArticleId article id |
Definition at line 215 of file oxbasketreservation.php.
oxBasketReservation.discardReservations | ( | ) |
discard all reserved articles
Definition at line 231 of file oxbasketreservation.php.
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 251 of file oxbasketreservation.php.
oxBasketReservation.getReservations | ( | ) |
get reservations collection
Definition at line 68 of file oxbasketreservation.php.
oxBasketReservation.getReservedAmount | ( | $ | sArticleId | ) |
return currently reserved amount for an article
string | $sArticleId article id |
Definition at line 117 of file oxbasketreservation.php.
oxBasketReservation.getTimeLeft | ( | ) |
return time left (in seconds) for basket before expiration
Definition at line 286 of file oxbasketreservation.php.
oxBasketReservation.renewExpiration | ( | ) |
renews expiration timer to maximum value
Definition at line 307 of file oxbasketreservation.php.
oxBasketReservation.reserveBasket | ( | oxBasket $ | oBasket | ) |
reserve given basket items
oxBasket | $oBasket basket object |
Definition at line 179 of file oxbasketreservation.php.
oxBasketReservation.$_aCurrentlyReserved = null [protected] |
Definition at line 22 of file oxbasketreservation.php.
oxBasketReservation.$_oReservations = null [protected] |
Definition at line 15 of file oxbasketreservation.php.