OXID eShop CE
6.4.2
|
Public Member Functions | |
init () | |
render () | |
toBasket ($sProductId=null, $dAmount=null, $aSel=null, $aPersParam=null, $blOverride=false) | |
changeBasket ( $sProductId=null, $dAmount=null, $aSel=null, $aPersParam=null, $blOverride=true) | |
isRootCatChanged () | |
executeUserChoice () | |
Public Attributes | |
$aRedirectParams | |
Protected Member Functions | |
_getRedirectUrl () | |
getPersistedParameters ($persistedParameters=null) | |
_getItems ($sProductId=null, $dAmount=null, $aSel=null, $aPersParam=null, $blOverride=false) | |
_addItems ($products) | |
_setLastCall ($sCallName, $aProductInfo, $aBasketInfo) | |
_setLastCallFnc ($sCallName) | |
_getLastCallFnc () | |
emptyBasket ($oBasket) | |
prepareProductInformation ($addProductId, $productInfo) | |
addItemToBasket ($basket, $itemData, $errorDestination) | |
Protected Attributes | |
$_blIsComponent = true | |
$_sLastCallFnc = null | |
Main shopping basket manager. Arranges shopping basket contents, updates amounts, prices, taxes etc.
@subpackage oxcmp
|
protected |
Adds all articles user wants to add to basket. Returns last added to basket item.
array | $products | products to add array |
|
protected |
Collects and returns array of items to add to basket. Product info is taken not only from given parameters, but additionally from request 'aproducts' parameter
string | $sProductId | product ID |
double | $dAmount | product amount |
array | $aSel | product select lists |
array | $aPersParam | product persistent parameters |
bool | $blOverride | amount override status |
|
protected |
Getting last call function name (data used by econda)
|
protected |
Formats and returns redirect URL where shop must be redirected after storing something to basket
|
protected |
Setting last call data to session (data used by econda)
string | $sCallName | name of action ('tobasket', 'changebasket') |
array | $aProductInfo | data which comes from request when you press button "to basket" |
array | $aBasketInfo | array returned by \OxidEsales\Eshop\Application\Model\Basket::getBasketSummary() |
|
protected |
Setting last call function name (data used by econda)
string | $sCallName | name of action ('tobasket', 'changebasket') |
|
protected |
Add one item to basket. Handle eventual errors.
\OxidEsales\Eshop\Application\Model\Basket | $basket | |
array | $itemData | |
string | $errorDestination |
OxidEsales\EshopCommunity\Application\Component\BasketComponent::changeBasket | ( | $sProductId = null , |
|
$dAmount = null , |
|||
$aSel = null , |
|||
$aPersParam = null , |
|||
$blOverride = true |
|||
) |
Similar to tobasket, except that as product id "bindex" parameter is (can be) taken
string | $sProductId | Product ID (default null) |
double | $dAmount | Product amount (default null) |
array | $aSel | (default null) |
array | $aPersParam | (default null) |
bool | $blOverride | If true means increase amount of chosen article (default false) |
|
protected |
Deletes user basket object from session and saved one from DB if needed.
\OxidEsales\Eshop\Application\Model\Basket | $oBasket |
OxidEsales\EshopCommunity\Application\Component\BasketComponent::executeUserChoice | ( | ) |
Executes user choice:
|
protected |
Cleans and returns persisted parameters.
array | $persistedParameters | key-value parameters (optional). If not passed - takes parameters from request. |
OxidEsales\EshopCommunity\Application\Component\BasketComponent::init | ( | ) |
Initiates component.
OxidEsales\EshopCommunity\Application\Component\BasketComponent::isRootCatChanged | ( | ) |
Returns true if active root category was changed
|
protected |
Prepare information for adding product to basket.
string | $addProductId | |
array | $productInfo |
OxidEsales\EshopCommunity\Application\Component\BasketComponent::render | ( | ) |
Loads basket ($oBasket = $mySession->getBasket()), calls oBasket->calculateBasket, executes parent::render() and returns basket object.
OxidEsales\EshopCommunity\Application\Component\BasketComponent::toBasket | ( | $sProductId = null , |
|
$dAmount = null , |
|||
$aSel = null , |
|||
$aPersParam = null , |
|||
$blOverride = false |
|||
) |
Basket content update controller. Before adding article - check if client is not a search engine. If yes - exits method by returning false. If no - executes oxcmp_basket::_addItems() and puts article to basket. Returns position where to redirect user browser.
string | $sProductId | Product ID (default null) |
double | $dAmount | Product amount (default null) |
array | $aSel | (default null) |
array | $aPersParam | (default null) |
bool | $blOverride | If true amount in basket is replaced by $dAmount otherwise amount is increased by $dAmount (default false) |
|
protected |
|
protected |
OxidEsales\EshopCommunity\Application\Component\BasketComponent::$aRedirectParams |