OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxcmp_basket Class Reference
+ Inheritance diagram for oxcmp_basket:
+ Collaboration diagram for oxcmp_basket:

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 Member Functions inherited from oxView
 setViewParameters ($aParams=null)
 getViewParameter ($sKey)
 setIsCallForCache ($blIsCallForCache=null)
 getIsCallForCache ()
 getViewId ()
 addGlobalParams ($oShop=null)
 addTplParam ($sPara, $sValue)
 getBelboonParam ()
 getViewConfig ()
 getTemplateName ()
 setTemplateName ($sTemplate)
 setClassName ($sClassName)
 getClassName ()
 setFncName ($sFncName)
 getFncName ()
 setViewData ($aViewData=null)
 getViewData ()
 getViewDataElement ($sParamId=null)
 setClassLocation ($sClassLocation=null)
 getClassLocation ()
 setThisAction ($sThisAction=null)
 getThisAction ()
 setParent ($oParent=null)
 getParent ()
 setIsComponent ($blIsComponent=null)
 getIsComponent ()
 executeFunction ($sFunction)
 getAdditionalParams ()
 getTrustedShopId ()
 getTSExcellenceId ()
 getCharSet ()
 getShopVersion ()
 getShopEdition ()
 getRevision ()
 getPackageInfo ()
 getShopFullEdition ()
 isDemoVersion ()
 isBetaVersion ()
 isRCVersion ()
 showBetaNote ()
 isDemoShop ()
 showNewsletter ()
 setShowNewsletter ($blShow)
 getShopLogo ()
 setShopLogo ($sLogo)
 getActCategory ()
 setActCategory ($oCategory)
 getCategoryId ()
 setCategoryId ($sCategoryId)
 getErrorDestination ()
 getActionClassName ()
 isConnectedWithFb ()
 getFbUserId ()
 showFbConnectToAccountMsg ()
 isMall ()
 showRdfa ()
 getSidForWidget ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Public Attributes

 $aRedirectParams

Protected Member Functions

 _getRedirectUrl ()
 _getItems ($sProductId=null, $dAmount=null, $aSel=null, $aPersParam=null, $blOverride=false)
 _addItems ($aProducts)
 _setLastCall ($sCallName, $aProductInfo, $aBasketInfo)
 _setLastCallFnc ($sCallName)
 _getLastCallFnc ()
- Protected Member Functions inherited from oxView
 _executeNewAction ($sNewAction)

Protected Attributes

 $_blIsComponent = true
 $_sLastCallFnc = null
- Protected Attributes inherited from oxView
 $_aViewData = array()
 $_sClassLocation = null
 $_sThisAction = null
 $_oParent = null
 $_blIsComponent = false
 $_sThisTemplate = null
 $_sViewId = null
 $_sClass = null
 $_sFnc = null
 $_sTrustedShopId = null
 $_sTSExcellenceId = null
 $_sCharSet = null
 $_sVersion = null
 $_blDemoVersion = null
 $_blDemoShop = null
 $_iNewsStatus = null
 $_sShopLogo = null
 $_sCategoryId = null
 $_oClickCat = null
 $_blIsCallForCache = false
 $_oViewConf = null

Additional Inherited Members

- Static Protected Attributes inherited from oxView
static $_blExecuted = false

Detailed Description

Main shopping basket manager. Arranges shopping basket contents, updates amounts, prices, taxes etc.

oxcmp

Definition at line 9 of file oxcmp_basket.php.

Member Function Documentation

oxcmp_basket::_addItems (   $aProducts)
protected

Adds all articles user wants to add to basket. Returns last added to basket item.

Parameters
array$aProductsproducts to add array
Returns
object $oBasketItem last added basket item

Definition at line 355 of file oxcmp_basket.php.

oxcmp_basket::_getItems (   $sProductId = null,
  $dAmount = null,
  $aSel = null,
  $aPersParam = null,
  $blOverride = false 
)
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

Parameters
string$sProductIdproduct ID
double$dAmountproduct amount
array$aSelproduct select lists
array$aPersParamproduct persistent parameters
bool$blOverrideamount override status
Returns
mixed

Definition at line 290 of file oxcmp_basket.php.

oxcmp_basket::_getLastCallFnc ( )
protected

Getting last call function name (data used by econda)

Returns
string

Definition at line 465 of file oxcmp_basket.php.

oxcmp_basket::_getRedirectUrl ( )
protected

Formats and returns redirect URL where shop must be redirected after storing something to basket

Returns
string $sClass.$sPosition redirection URL

Definition at line 242 of file oxcmp_basket.php.

oxcmp_basket::_setLastCall (   $sCallName,
  $aProductInfo,
  $aBasketInfo 
)
protected

Setting last call data to session (data used by econda)

Parameters
string$sCallNamename of action ('tobasket', 'changebasket')
array$aProductInfodata which comes from request when you press button "to basket"
array$aBasketInfoarray returned by oxbasket::getBasketSummary()

Definition at line 445 of file oxcmp_basket.php.

oxcmp_basket::_setLastCallFnc (   $sCallName)
protected

Setting last call function name (data used by econda)

Parameters
string$sCallNamename of action ('tobasket', 'changebasket')

Definition at line 455 of file oxcmp_basket.php.

oxcmp_basket::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

Parameters
string$sProductIdProduct ID (default null)
double$dAmountProduct amount (default null)
array$aSel(default null)
array$aPersParam(default null)
bool$blOverrideIf true means increase amount of chosen article (default false)
Returns
mixed

Definition at line 172 of file oxcmp_basket.php.

oxcmp_basket::executeuserchoice ( )

Executes user choice:

  • if user clicked on "Proceed to checkout" - redirects to basket,
  • if clicked "Continue shopping" - clear basket
Returns
mixed

Definition at line 507 of file oxcmp_basket.php.

oxcmp_basket::init ( )

Initiates component.

Reimplemented from oxView.

Definition at line 52 of file oxcmp_basket.php.

oxcmp_basket::isRootCatChanged ( )

Returns true if active root category was changed

Returns
bool

Definition at line 475 of file oxcmp_basket.php.

oxcmp_basket::render ( )

Loads basket ($oBasket = $mySession->getBasket()), calls oBasket->calculateBasket, executes parent::render() and returns basket object.

Returns
object $oBasket basket object

Reimplemented from oxView.

Definition at line 87 of file oxcmp_basket.php.

oxcmp_basket::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.

Parameters
string$sProductIdProduct ID (default null)
double$dAmountProduct amount (default null)
array$aSel(default null)
array$aPersParam(default null)
bool$blOverrideIf true means increase amount of chosen article (default false)
Returns
mixed

Definition at line 114 of file oxcmp_basket.php.

Member Data Documentation

oxcmp_basket::$_blIsComponent = true
protected

Definition at line 17 of file oxcmp_basket.php.

oxcmp_basket::$_sLastCallFnc = null
protected

Definition at line 24 of file oxcmp_basket.php.

oxcmp_basket::$aRedirectParams
Initial value:
array('cnid',
'mnid',
'anid',
'tpl',
'listtype',
'searchcnid',
'searchvendor',
'searchmanufacturer',
'searchtag',
'searchrecomm',
'recommid'
)

Definition at line 32 of file oxcmp_basket.php.


The documentation for this class was generated from the following file: