|
eZ Publish
[trunk]
|
eZBasket handles shopping baskets More...
Inheritance diagram for eZBasket:
Collaboration diagram for eZBasket:Public Member Functions | |
| canAddProduct ($contentObject) | |
| createOrder () | |
| eZBasket ($row) | |
| isEmpty () | |
| isVATKnown () | |
| items ($asObject=true, $sorts=array( 'contentobject_id'=> 'desc')) | |
| Fetch basket items (ordered by object id by default) | |
| itemsInfo () | |
| itemsOrdered ($asObject=true, $order=true) | |
| Fetch basket items ordered by id ( the order they are added to basket ) | |
| productCollection () | |
| removeItem ($itemID) | |
| totalExVAT () | |
| totalIncVAT () | |
| type () | |
| updatePrices () | |
Static Public Member Functions | |
| static | cleanup () |
| static | cleanupCurrentBasket ($useSetting=true) |
| static | cleanupExpired ($time) |
| static | currentBasket ($asObject=true, $byOrderID=-1) |
| static | definition () |
| static | fetch ($sessionKey) |
Public Attributes | |
| const | ITEM_LIMIT = 3000 |
eZBasket handles shopping baskets
Definition at line 19 of file ezbasket.php.
| eZBasket::canAddProduct | ( | $ | contentObject | ) |
Definition at line 558 of file ezbasket.php.
| static eZBasket::cleanup | ( | ) | [static] |
Removes all baskets for all users.
Definition at line 505 of file ezbasket.php.
| static eZBasket::cleanupCurrentBasket | ( | $ | useSetting = true | ) | [static] |
Removes current basket.
| $useSetting | - if "true" use ini setting in site.ini [ShopSettings].ClearBasketOnLogout, or just clear current basket otherwise. |
Definition at line 597 of file ezbasket.php.
Referenced by eZUser\logoutCurrent().
| static eZBasket::cleanupExpired | ( | $ | time | ) | [static] |
Removes all baskets which are considered expired (due to session expiration).
Definition at line 447 of file ezbasket.php.
Referenced by eZSessionBasketGarbageCollector().
Creates a temporary order for the current basket. The order object is returned.
Definition at line 349 of file ezbasket.php.
| static eZBasket::currentBasket | ( | $ | asObject = true, |
| $ | byOrderID = -1 |
||
| ) | [static] |
Will return the basket for the current session. If a basket does not exist one will be created.
Definition at line 301 of file ezbasket.php.
Referenced by eZShopOperationCollection\activateOrder(), eZShopOperationCollection\addToBasket(), cleanupCurrentBasket(), eZShopOperationCollection\updateBasket(), and eZShopOperationCollection\updateShippingInfo().
| static eZBasket::definition | ( | ) | [static] |
Reimplemented from eZPersistentObject.
Definition at line 34 of file ezbasket.php.
Referenced by currentBasket(), fetch(), and eZShopFunctionCollection\fetchBasket().
| eZBasket::eZBasket | ( | $ | row | ) |
Definition at line 26 of file ezbasket.php.
Referenced by currentBasket().
| static eZBasket::fetch | ( | $ | sessionKey | ) | [static] |
Fetches the basket which belongs to session $sessionKey.
| $sessionKey | A string containing the session key. |
false if none was found. Definition at line 288 of file ezbasket.php.
Referenced by productCollection(), and removeItem().
Definition at line 277 of file ezbasket.php.
Returns true if VAT percentage is known for all basket items.
Definition at line 228 of file ezbasket.php.
| eZBasket::items | ( | $ | asObject = true, |
| $ | sorts = array( 'contentobject_id' => 'desc' ) |
||
| ) |
Fetch basket items (ordered by object id by default)
| bool | $asObject | |
| array | null | $sorts | Array with sort data sent directly to eZPersistentObject::fetchObjectList() |
Definition at line 78 of file ezbasket.php.
Referenced by isEmpty(), isVATKnown(), itemsInfo(), itemsOrdered(), totalExVAT(), totalIncVAT(), and updatePrices().
Fetching calculated information about the product items.
Definition at line 157 of file ezbasket.php.
| eZBasket::itemsOrdered | ( | $ | asObject = true, |
| $ | order = true |
||
| ) |
Fetch basket items ordered by id ( the order they are added to basket )
| bool | $asObject | |
| bool | $order | True (default) for ascending[0->9] and false for decending[9->0] |
Definition at line 149 of file ezbasket.php.
Definition at line 583 of file ezbasket.php.
| eZBasket::removeItem | ( | $ | itemID | ) |
Definition at line 268 of file ezbasket.php.
Definition at line 252 of file ezbasket.php.
Definition at line 240 of file ezbasket.php.
| eZBasket::type | ( | ) |
Definition at line 536 of file ezbasket.php.
Referenced by canAddProduct().
Definition at line 383 of file ezbasket.php.
| const eZBasket::ITEM_LIMIT = 3000 |
Controls the default value for how many items are cleaned in one batch operation.
Definition at line 24 of file ezbasket.php.
Referenced by cleanup(), and cleanupExpired().