

Public Member Functions | |
| __construct () | |
| setIsNewBasket () | |
| getArticles () | |
| getItems ($blReload=false) | |
| getItem ($sProductId, $aSelList) | |
| getItemCount ($blReload=false) | |
| addItemToBasket ($sProductId=null, $dAmount=null, $aSel=null, $blOverride=false) | |
| delete ($sOXID=null) | |
Protected Member Functions | |
| _insert () | |
| _createItem ($sProductId, $aSelList=null) | |
| _getItemKey ($sProductId, $aSel=null) | |
Protected Attributes | |
| $_aSkipSaveFields = array('oxcreate') | |
| $_sClassName = 'oxUserbasket' | |
| $_aBasketItems = null | |
| $_blNewBasket = false | |
| oxUserBasket.__construct | ( | ) |
Class constructor, initiates parent constructor (parent.oxBase()).
Reimplemented from oxBase.
| oxUserBasket._insert | ( | ) | [protected] |
| oxUserBasket.setIsNewBasket | ( | ) |
Sets basket as newly created. This usually means that it is not yet stored in DB and will only be stored if some item is added
| oxUserBasket.getArticles | ( | ) |
Returns an array of articles belonging to the Items in the basket
| oxUserBasket.getItems | ( | $ | blReload = false |
) |
Returns list of basket items
| bool | $blReload if TRUE forces to reload list |
| oxUserBasket._createItem | ( | $ | sProductId, | |
| $ | aSelList = null | |||
| ) | [protected] |
Creates and returns oxuserbasketitem object
| string | $sProductId Product Id | |
| array | $aSelList product select lists |
| oxUserBasket.getItem | ( | $ | sProductId, | |
| $ | aSelList | |||
| ) |
Searches for item in basket items array and returns it. If not item was found - new item is created.
| string | $sProductId product id, basket item id or basket item index | |
| array | $aSelList select lists |
| oxUserBasket._getItemKey | ( | $ | sProductId, | |
| $ | aSel = null | |||
| ) | [protected] |
Returns unique item key according to its ID and user chosen select
| string | $sProductId Product Id | |
| array | $aSel product select lists |
| oxUserBasket.getItemCount | ( | $ | blReload = false |
) |
Returns current basket item count
| bool | $blReload if TRUE forces to reload list |
| oxUserBasket.addItemToBasket | ( | $ | sProductId = null, |
|
| $ | dAmount = null, |
|||
| $ | aSel = null, |
|||
| $ | blOverride = false | |||
| ) |
Method adds/removes user chosen article to/from his noticelist or wishlist. Returns total amount of articles in list.
| string | $sProductId Article ID | |
| double | $dAmount Product amount | |
| array | $aSel product select lists | |
| bool | $blOverride if true overrides $dAmount, else sums previous with current it |
| oxUserBasket.delete | ( | $ | sOXID = null |
) |
Deletes current basket history
| string | $sOXID Object ID(default null) |
Reimplemented from oxBase.
oxUserBasket.$_aSkipSaveFields = array('oxcreate') [protected] |
Reimplemented from oxBase.
oxUserBasket.$_sClassName = 'oxUserbasket' [protected] |
Reimplemented from oxBase.
oxUserBasket.$_aBasketItems = null [protected] |
oxUserBasket.$_blNewBasket = false [protected] |
1.5.5