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

Public Member Functions

 getBasketItemKey ()
 setBasketItemKey ($itemKey)
 getRegularUnitPrice ()
 setRegularUnitPrice ($oRegularUnitPrice)
 init ($sProductID, $dAmount, $aSel=null, $aPersParam=null, $blBundle=null)
 initFromOrderArticle ($oOrderArticle)
 setAsDiscountArticle ($blIsDiscountArticle)
 setStockCheckStatus ($blStatus)
 getStockCheckStatus ()
 setAmount ($dAmount, $blOverride=true, $sItemKey=null)
 setPrice ($oPrice)
 getIconUrl ()
 getArticle ($blCheckProduct=false, $sProductId=null, $blDisableLazyLoading=false)
 getdBundledAmount ()
 getPrice ()
 getUnitPrice ()
 getAmount ()
 getWeight ()
 getTitle ()
 getLink ()
 getShopId ()
 getSelList ()
 getChosenSelList ()
 isBundle ()
 isDiscountArticle ()
 isSkipDiscount ()
 __get ($sName)
 __sleep ()
 getPersParams ()
 setPersParams ($aPersParam)
 setBundle ($blBundle)
 setSkipDiscounts ($blSkip)
 getProductId ()
 setWrapping ($sWrapId)
 getWrappingId ()
 getWrapping ()
 getWishId ()
 setWishId ($sWishId)
 setWishArticleId ($sArticleId)
 getWishArticleId ()
 getFRegularUnitPrice ()
 getFUnitPrice ()
 getFTotalPrice ()
 getVatPercent ()
 getVarSelect ()
 getLanguageId ()
 setLanguageId ($iLanguageId)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _setArticle ($sProductId)
 _setFromOrderArticle ($oOrderArticle)
 _setSelectList ($aSelList)

Protected Attributes

 $_sProductId = null
 $_sTitle = null
 $_sVarSelect = null
 $_sIcon = null
 $_sLink = null
 $_oPrice = null
 $_oUnitPrice = null
 $_dAmount = 0.0
 $_dWeight = 0
 $_aSelList = array()
 $_sShopId = null
 $_sNativeShopId = null
 $_blSkipDiscounts = false
 $_aPersistentParameters = array()
 $_blBundle = false
 $_blIsDiscountArticle = false
 $_oArticle = null
 $_sDimageDirNoSsl = null
 $_sDimageDirSsl = null
 $_aChosenSelectlist = array()
 $_sWrappingId = null
 $_sWishId = null
 $_sWishArticleId = null
 $_blCheckArticleStock = true
 $_iLanguageId = null
 $_blSsl = null
 $_sIconUrl = null
 $_oRegularUnitPrice = null
 $basketItemKey = null

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

UserBasketItem class, responsible for storing most important fields

Definition at line 7 of file oxbasketitem.php.

Member Function Documentation

oxBasketItem::__get (   $sName)

Special getter function for backwards compatibility. Executes methods by rule "get".$sVariableName and returns result processed by executed function.

Parameters
string$sNameparameter name
Returns
mixed

Definition at line 657 of file oxbasketitem.php.

oxBasketItem::__sleep ( )

Does not return _oArticle var on serialisation

Returns
array

Definition at line 669 of file oxbasketitem.php.

oxBasketItem::_setArticle (   $sProductId)
protected

Assigns general product parameters to oxbasketitem object :

  • sProduct - oxarticle object ID;
  • title - products title;
  • icon - icon name;
  • link - details URL's;
  • sShopId - current shop ID;
  • sNativeShopId - article shop ID;
  • _sDimageDirNoSsl - NON SSL mode image path;
  • _sDimageDirSsl - SSL mode image path;
Parameters
string$sProductIdproduct id
Exceptions
oxNoArticleExceptionexception

Definition at line 696 of file oxbasketitem.php.

oxBasketItem::_setFromOrderArticle (   $oOrderArticle)
protected

Assigns general product parameters to oxbasketitem object:

  • sProduct - oxarticle object ID;
  • title - products title;
  • sShopId - current shop ID;
  • sNativeShopId - article shop ID;
Parameters
oxorderarticle$oOrderArticleorder article

Definition at line 734 of file oxbasketitem.php.

oxBasketItem::_setSelectList (   $aSelList)
protected

Stores item select lists ( oxbasketitem::aSelList )

Parameters
array$aSelListitem select lists

Definition at line 755 of file oxbasketitem.php.

oxBasketItem::getAmount ( )

Returns the amount of item.

Returns
double

Definition at line 539 of file oxbasketitem.php.

oxBasketItem::getArticle (   $blCheckProduct = false,
  $sProductId = null,
  $blDisableLazyLoading = false 
)

Retrieves the article .Throws an exception if article does not exist, is not buyable or visible.

Parameters
bool$blCheckProductchecks if product is buyable and visible
string$sProductIdproduct id
bool$blDisableLazyLoadingdisable lazy loading
Exceptions
oxArticleExceptionexception in case of no current object product id is set
oxNoArticleExceptionexception in case if product not exitst or not visible
oxArticleInputExceptionexception if product is not buyable (stock and so on)
Returns
oxArticle|oxOrderArticle

Definition at line 444 of file oxbasketitem.php.

oxBasketItem::getBasketItemKey ( )

Getter for basketItemkey.

Returns
string | null

Definition at line 220 of file oxbasketitem.php.

oxBasketItem::getChosenSelList ( )

Returns user chosen select list information

Returns
array

Definition at line 613 of file oxbasketitem.php.

oxBasketItem::getdBundledAmount ( )

Returns bundle amount

Returns
double

Definition at line 509 of file oxbasketitem.php.

oxBasketItem::getFRegularUnitPrice ( )

Returns formatted regular unit price

Deprecated:
in v4.8/5.1 on 2013-10-08; use oxPrice smarty formatter
Returns
string

Definition at line 910 of file oxbasketitem.php.

oxBasketItem::getFTotalPrice ( )

Returns formatted total price

Deprecated:
in v4.8/5.1 on 2013-10-08; use oxPrice smarty formatter
Returns
string

Definition at line 934 of file oxbasketitem.php.

oxBasketItem::getFUnitPrice ( )

Returns formatted unit price

Deprecated:
in v4.8/5.1 on 2013-10-08; use oxPrice smarty formatter
Returns
string

Definition at line 922 of file oxbasketitem.php.

oxBasketItem::getIconUrl ( )

Returns article icon picture url

Returns
string

Definition at line 420 of file oxbasketitem.php.

oxBasketItem::getLanguageId ( )

Get language id

Returns
integer

Definition at line 970 of file oxbasketitem.php.

oxBasketItem::getLink ( )

Returns product details URL

Returns
string

Definition at line 579 of file oxbasketitem.php.

oxBasketItem::getPersParams ( )

Get persistent parameters ( oxbasketitem::_aPersistentParameters )

Returns
array

Definition at line 782 of file oxbasketitem.php.

oxBasketItem::getPrice ( )

Returns the price.

Returns
oxprice

Definition at line 519 of file oxbasketitem.php.

oxBasketItem::getProductId ( )

Returns product Id

Returns
string product id

Definition at line 822 of file oxbasketitem.php.

oxBasketItem::getRegularUnitPrice ( )

Return regular unit price

Returns
oxPrice

Definition at line 240 of file oxbasketitem.php.

oxBasketItem::getSelList ( )

Returns user passed select list information

Returns
array

Definition at line 603 of file oxbasketitem.php.

oxBasketItem::getShopId ( )

Returns ID of shop from which this product was added into basket

Returns
string

Definition at line 593 of file oxbasketitem.php.

oxBasketItem::getStockCheckStatus ( )

Returns stock control mode

Returns
bool

Definition at line 327 of file oxbasketitem.php.

oxBasketItem::getTitle ( )

Returns product title

Returns
string

Definition at line 559 of file oxbasketitem.php.

oxBasketItem::getUnitPrice ( )

Returns the price.

Returns
oxprice

Definition at line 529 of file oxbasketitem.php.

oxBasketItem::getVarSelect ( )

Returns varselect value

Returns
string

Definition at line 954 of file oxbasketitem.php.

oxBasketItem::getVatPercent ( )

Returns formatted total price

Returns
string

Definition at line 944 of file oxbasketitem.php.

oxBasketItem::getWeight ( )

returns the total weight.

Returns
double

Definition at line 549 of file oxbasketitem.php.

oxBasketItem::getWishArticleId ( )

Returns wish article Id

Returns
string

Definition at line 898 of file oxbasketitem.php.

oxBasketItem::getWishId ( )

Returns wishlist user Id

Returns
string

Definition at line 868 of file oxbasketitem.php.

oxBasketItem::getWrapping ( )

Returns basket item wrapping object

Returns
oxwrapping

Definition at line 852 of file oxbasketitem.php.

oxBasketItem::getWrappingId ( )

Returns wrapping paper ID (if such was applied)

Returns
string

Definition at line 842 of file oxbasketitem.php.

oxBasketItem::init (   $sProductID,
  $dAmount,
  $aSel = null,
  $aPersParam = null,
  $blBundle = null 
)

Assigns basic params to basket item

  • oxbasketitem::_setArticle();
  • oxbasketitem::setAmount();
  • oxbasketitem::_setSelectList();
  • oxbasketitem::setPersParams();
  • oxbasketitem::setBundle().
Parameters
string$sProductIDproduct id
double$dAmountamount
array$aSelselection
array$aPersParampersistent params
bool$blBundlebundle
Exceptions
oxNoArticleException,oxOutOfStockException,oxArticleInputException

Definition at line 272 of file oxbasketitem.php.

oxBasketItem::initFromOrderArticle (   $oOrderArticle)

Initializes basket item from oxorderarticle object

  • oxbasketitem::_setFromOrderArticle() - assigns $oOrderArticle parameter to oxBasketItem::_oArticle. Thus oxOrderArticle is used as oxArticle (calls standard methods implemented by oxIArticle interface);
  • oxbasketitem::setAmount();
  • oxbasketitem::_setSelectList();
  • oxbasketitem::setPersParams().
Parameters
oxorderarticle$oOrderArticleorder article to load info from

Definition at line 293 of file oxbasketitem.php.

oxBasketItem::isBundle ( )

Returns true if product is bundle

Returns
bool

Definition at line 623 of file oxbasketitem.php.

oxBasketItem::isDiscountArticle ( )

Returns true if product is given as discount

Returns
bool

Definition at line 633 of file oxbasketitem.php.

oxBasketItem::isSkipDiscount ( )

Returns true if discount must be skipped for current product

Returns
bool

Definition at line 643 of file oxbasketitem.php.

oxBasketItem::setAmount (   $dAmount,
  $blOverride = true,
  $sItemKey = null 
)

Sets item amount and weight which depends on amount ( oxbasketitem::dAmount, oxbasketitem::dWeight )

Parameters
double$dAmountamount
bool$blOverrideWhether to override current amount.
string$sItemKeyitem key
Exceptions
oxArticleInputException
oxOutOfStockException

Definition at line 343 of file oxbasketitem.php.

oxBasketItem::setAsDiscountArticle (   $blIsDiscountArticle)

Marks if item is discount bundle ( oxbasketitem::_blIsDiscountArticle )

Parameters
bool$blIsDiscountArticleif item is discount bundle

Definition at line 307 of file oxbasketitem.php.

oxBasketItem::setBasketItemKey (   $itemKey)

Setter for basketItemkey.

Parameters
$itemKey

Definition at line 230 of file oxbasketitem.php.

oxBasketItem::setBundle (   $blBundle)

Marks if item is bundle ( oxbasketitem::blBundle )

Parameters
bool$blBundleif item is bundle

Definition at line 802 of file oxbasketitem.php.

oxBasketItem::setLanguageId (   $iLanguageId)

Set language Id, reload basket content on language change.

Parameters
integer$iLanguageIdlanguage id

Definition at line 980 of file oxbasketitem.php.

oxBasketItem::setPersParams (   $aPersParam)

Stores items persistent parameters ( oxbasketitem::_aPersistentParameters )

Parameters
array$aPersParamitems persistent parameters

Definition at line 792 of file oxbasketitem.php.

oxBasketItem::setPrice (   $oPrice)

Sets $this->_oPrice

Parameters
object$oPriceprice

Definition at line 407 of file oxbasketitem.php.

oxBasketItem::setRegularUnitPrice (   $oRegularUnitPrice)

Set regular unit price

Parameters
oxPrice$oRegularUnitPriceregular price

Definition at line 250 of file oxbasketitem.php.

oxBasketItem::setSkipDiscounts (   $blSkip)

Used to set "skip discounts" status for basket item

Parameters
bool$blSkipset true to skip discounts

Definition at line 812 of file oxbasketitem.php.

oxBasketItem::setStockCheckStatus (   $blStatus)

Sets stock control mode

Parameters
bool$blStatusstock control mode

Definition at line 317 of file oxbasketitem.php.

oxBasketItem::setWishArticleId (   $sArticleId)

Wish article Id setter

Parameters
string$sArticleIdwish article id

Definition at line 888 of file oxbasketitem.php.

oxBasketItem::setWishId (   $sWishId)

Wish user id setter

Parameters
string$sWishIduser id

Definition at line 878 of file oxbasketitem.php.

oxBasketItem::setWrapping (   $sWrapId)

Product wrapping paper id setter

Parameters
string$sWrapIdwrapping paper id

Definition at line 832 of file oxbasketitem.php.

Member Data Documentation

oxBasketItem::$_aChosenSelectlist = array()
protected

Definition at line 148 of file oxbasketitem.php.

oxBasketItem::$_aPersistentParameters = array()
protected

Definition at line 106 of file oxbasketitem.php.

oxBasketItem::$_aSelList = array()
protected

Definition at line 78 of file oxbasketitem.php.

oxBasketItem::$_blBundle = false
protected

Definition at line 113 of file oxbasketitem.php.

oxBasketItem::$_blCheckArticleStock = true
protected

Definition at line 176 of file oxbasketitem.php.

oxBasketItem::$_blIsDiscountArticle = false
protected

Definition at line 120 of file oxbasketitem.php.

oxBasketItem::$_blSkipDiscounts = false
protected

Definition at line 99 of file oxbasketitem.php.

oxBasketItem::$_blSsl = null
protected

Definition at line 191 of file oxbasketitem.php.

oxBasketItem::$_dAmount = 0.0
protected

Definition at line 64 of file oxbasketitem.php.

oxBasketItem::$_dWeight = 0
protected

Definition at line 71 of file oxbasketitem.php.

oxBasketItem::$_iLanguageId = null
protected

Definition at line 184 of file oxbasketitem.php.

oxBasketItem::$_oArticle = null
protected

Definition at line 127 of file oxbasketitem.php.

oxBasketItem::$_oPrice = null
protected

Definition at line 50 of file oxbasketitem.php.

oxBasketItem::$_oRegularUnitPrice = null
protected

Definition at line 206 of file oxbasketitem.php.

oxBasketItem::$_oUnitPrice = null
protected

Definition at line 57 of file oxbasketitem.php.

oxBasketItem::$_sDimageDirNoSsl = null
protected

Definition at line 134 of file oxbasketitem.php.

oxBasketItem::$_sDimageDirSsl = null
protected

Definition at line 141 of file oxbasketitem.php.

oxBasketItem::$_sIcon = null
protected

Definition at line 36 of file oxbasketitem.php.

oxBasketItem::$_sIconUrl = null
protected

Definition at line 198 of file oxbasketitem.php.

oxBasketItem::$_sLink = null
protected

Definition at line 43 of file oxbasketitem.php.

oxBasketItem::$_sNativeShopId = null
protected

Definition at line 92 of file oxbasketitem.php.

oxBasketItem::$_sProductId = null
protected

Definition at line 15 of file oxbasketitem.php.

oxBasketItem::$_sShopId = null
protected

Definition at line 85 of file oxbasketitem.php.

oxBasketItem::$_sTitle = null
protected

Definition at line 22 of file oxbasketitem.php.

oxBasketItem::$_sVarSelect = null
protected

Definition at line 29 of file oxbasketitem.php.

oxBasketItem::$_sWishArticleId = null
protected

Definition at line 169 of file oxbasketitem.php.

oxBasketItem::$_sWishId = null
protected

Definition at line 162 of file oxbasketitem.php.

oxBasketItem::$_sWrappingId = null
protected

Definition at line 155 of file oxbasketitem.php.

oxBasketItem::$basketItemKey = null
protected

Definition at line 213 of file oxbasketitem.php.


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