OXID eShop CE
6.1.6
|
Public Member Functions | |
__construct () | |
setIsNewBasket () | |
isNewBasket () | |
isEmpty () | |
getArticles () | |
getItems ($blReload=false, $blActiveCheck=true) | |
getItem ($sProductId, $aSelList, $aPersParams=null) | |
getItemCount ($blReload=false) | |
addItemToBasket ($sProductId=null, $dAmount=null, $aSel=null, $blOverride=false, $aPersParam=null) | |
delete ($sOXID=null) | |
isVisible () | |
Protected Member Functions | |
_insert () | |
_createItem ($sProductId, $aSelList=null, $aPersParams=null) | |
_getItemKey ($sProductId, $aSel=null, $aPersParam=null) | |
Protected Attributes | |
$_aSkipSaveFields = ['oxcreate', 'oxtimestamp'] | |
$_sClassName = 'oxUserbasket' | |
$_aBasketItems = null | |
$_blNewBasket = false | |
Virtual basket manager class. Virtual baskets are user article lists which are stored in database (noticelists, wishlists). The name of the class is left like this because of historic reasons. It is more relevant to wishlist and noticelist than to shoping basket. Collects shopping basket information, updates it (DB level), removes or adds articles to it.
OxidEsales\EshopCommunity\Application\Model\UserBasket::__construct | ( | ) |
Class constructor, initiates parent constructor (parent::oxBase()).
|
protected |
Creates and returns oxuserbasketitem object
string | $sProductId | Product Id |
array | $aSelList | product select lists |
string | $aPersParams | persistent parameters |
|
protected |
Returns unique item key according to its ID and user chosen select
string | $sProductId | Product Id |
array | $aSel | product select lists |
array | $aPersParam | basket item persistent parameters |
|
protected |
Inserts object data to DB, returns true on success.
OxidEsales\EshopCommunity\Application\Model\UserBasket::addItemToBasket | ( | $sProductId = null , |
|
$dAmount = null , |
|||
$aSel = null , |
|||
$blOverride = false , |
|||
$aPersParam = null |
|||
) |
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 |
array | $aPersParam | product persistent parameters (default null) |
OxidEsales\EshopCommunity\Application\Model\UserBasket::delete | ( | $sOXID = null | ) |
Deletes current basket history
string | $sOXID | Object ID(default null) |
OxidEsales\EshopCommunity\Application\Model\UserBasket::getArticles | ( | ) |
Returns an array of articles belonging to the Items in the basket
OxidEsales\EshopCommunity\Application\Model\UserBasket::getItem | ( | $sProductId, | |
$aSelList, | |||
$aPersParams = null |
|||
) |
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 |
string | $aPersParams | persistent parameters |
OxidEsales\EshopCommunity\Application\Model\UserBasket::getItemCount | ( | $blReload = false | ) |
Returns current basket item count
bool | $blReload | if TRUE forces to reload list |
OxidEsales\EshopCommunity\Application\Model\UserBasket::getItems | ( | $blReload = false , |
|
$blActiveCheck = true |
|||
) |
Returns list of basket items
bool | $blReload | if TRUE forces to reload list |
bool | $blActiveCheck | should articles be checked for active state? |
OxidEsales\EshopCommunity\Application\Model\UserBasket::isEmpty | ( | ) |
Checks if user basket is empty
OxidEsales\EshopCommunity\Application\Model\UserBasket::isNewBasket | ( | ) |
Checks if user basket is newly created
OxidEsales\EshopCommunity\Application\Model\UserBasket::isVisible | ( | ) |
Checks if user basket is visible for current user (public or own basket)
OxidEsales\EshopCommunity\Application\Model\UserBasket::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
|
protected |
|
protected |
|
protected |
|
protected |