UserBasketItem class, responsible for storing most important fields
◆ __get()
OxidEsales\EshopCommunity\Application\Model\BasketItem::__get |
( |
|
$sName | ) |
|
Special getter function for backwards compatibility. Executes methods by rule "get".$sVariableName and returns result processed by executed function.
- Parameters
-
string | $sName | parameter name |
- Returns
- mixed
◆ __sleep()
OxidEsales\EshopCommunity\Application\Model\BasketItem::__sleep |
( |
| ) |
|
Does not return _oArticle var on serialisation
- Returns
- array
◆ applyPackageOnAmount()
OxidEsales\EshopCommunity\Application\Model\BasketItem::applyPackageOnAmount |
( |
|
$article, |
|
|
|
$amount |
|
) |
| |
|
protected |
Apply checks for package on amount
- Parameters
-
\OxidEsales\Eshop\Application\Model\Article | $article | |
double | $amount | |
- Returns
- double
◆ getAmount()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getAmount |
( |
| ) |
|
Returns the amount of item.
- Returns
- double
◆ getArticle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::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 | $blCheckProduct | checks if product is buyable and visible |
string | $sProductId | product id |
bool | $blDisableLazyLoading | disable lazy loading |
- Exceptions
-
◆ getBasketItemKey()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getBasketItemKey |
( |
| ) |
|
Getter for basketItemkey.
- Returns
- string|null
◆ getChosenSelList()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getChosenSelList |
( |
| ) |
|
Returns user chosen select list information
- Returns
- array
◆ getdBundledAmount()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getdBundledAmount |
( |
| ) |
|
Returns bundle amount
- Returns
- double
◆ getFRegularUnitPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getFRegularUnitPrice |
( |
| ) |
|
Returns formatted regular unit price
- Deprecated:
- in v4.8/5.1 on 2013-10-08; use oxPrice template engine formatter
- Returns
- string
◆ getFTotalPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getFTotalPrice |
( |
| ) |
|
Returns formatted total price
- Deprecated:
- in v4.8/5.1 on 2013-10-08; use oxPrice template engine formatter
- Returns
- string
◆ getFUnitPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getFUnitPrice |
( |
| ) |
|
Returns formatted unit price
- Deprecated:
- in v4.8/5.1 on 2013-10-08; use oxPrice template engine formatter
- Returns
- string
◆ getIconUrl()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getIconUrl |
( |
| ) |
|
Returns article icon picture url
- Returns
- string
◆ getLanguageId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getLanguageId |
( |
| ) |
|
Get language id
- Returns
- integer
◆ getLink()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getLink |
( |
| ) |
|
Returns product details URL
- Returns
- string
◆ getPersParams()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getPersParams |
( |
| ) |
|
Get persistent parameters ( oxbasketitem::_aPersistentParameters )
- Returns
- array
◆ getPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getPrice |
( |
| ) |
|
Returns the price.
- Returns
- \OxidEsales\Eshop\Core\Price
◆ getProductId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getProductId |
( |
| ) |
|
Returns product Id
- Returns
- string product id
◆ getRegularUnitPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getRegularUnitPrice |
( |
| ) |
|
Return regular unit price
- Returns
- \OxidEsales\Eshop\Core\Price
◆ getSelList()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getSelList |
( |
| ) |
|
Returns user passed select list information
- Returns
- array
◆ getShopId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getShopId |
( |
| ) |
|
Returns ID of shop from which this product was added into basket
- Returns
- string
◆ getStockCheckStatus()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getStockCheckStatus |
( |
| ) |
|
Returns stock control mode
- Returns
- bool
◆ getTitle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getTitle |
( |
| ) |
|
Returns product title
- Returns
- string
◆ getUnitPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getUnitPrice |
( |
| ) |
|
Returns the price.
- Returns
- \OxidEsales\Eshop\Core\Price
◆ getVarSelect()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getVarSelect |
( |
| ) |
|
Returns varselect value
- Returns
- string
◆ getVatPercent()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getVatPercent |
( |
| ) |
|
Returns formatted total price
- Returns
- string
◆ getWeight()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getWeight |
( |
| ) |
|
returns the total weight.
- Returns
- double
◆ getWishArticleId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getWishArticleId |
( |
| ) |
|
Returns wish article Id
- Returns
- string
◆ getWishId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getWishId |
( |
| ) |
|
Returns wishlist user Id
- Returns
- string
◆ getWrapping()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getWrapping |
( |
| ) |
|
Returns basket item wrapping object
- Returns
- \OxidEsales\Eshop\Application\Model\Wrapping
◆ getWrappingId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::getWrappingId |
( |
| ) |
|
Returns wrapping paper ID (if such was applied)
- Returns
- string
◆ init()
OxidEsales\EshopCommunity\Application\Model\BasketItem::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 | $sProductID | product id |
double | $dAmount | amount |
array | $aSel | selection |
array | $aPersParam | persistent params |
bool | $blBundle | bundle |
- Exceptions
-
oxNoArticleException | |
oxOutOfStockException | |
oxArticleInputException | |
◆ initFromOrderArticle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::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
-
\OxidEsales\Eshop\Application\Model\OrderArticle | $oOrderArticle | order article to load info from |
◆ isBundle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::isBundle |
( |
| ) |
|
Returns true if product is bundle
- Returns
- bool
◆ isDiscountArticle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::isDiscountArticle |
( |
| ) |
|
Returns true if product is given as discount
- Returns
- bool
◆ isSkipDiscount()
OxidEsales\EshopCommunity\Application\Model\BasketItem::isSkipDiscount |
( |
| ) |
|
Returns true if discount must be skipped for current product
- Returns
- bool
◆ setAmount()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setAmount |
( |
|
$dAmount, |
|
|
|
$blOverride = true , |
|
|
|
$sItemKey = null |
|
) |
| |
Sets item amount and weight which depends on amount ( oxbasketitem::dAmount, oxbasketitem::dWeight )
- Parameters
-
double | $dAmount | amount |
bool | $blOverride | Whether to override current amount. |
string | $sItemKey | item key |
- Exceptions
-
oxArticleInputException | |
oxOutOfStockException | |
◆ setArticle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::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 | $sProductId | product id |
- Exceptions
-
oxNoArticleException | exception |
◆ setAsDiscountArticle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setAsDiscountArticle |
( |
|
$blIsDiscountArticle | ) |
|
Marks if item is discount bundle ( oxbasketitem::_blIsDiscountArticle )
- Parameters
-
bool | $blIsDiscountArticle | if item is discount bundle |
◆ setBasketItemKey()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setBasketItemKey |
( |
|
$itemKey | ) |
|
Setter for basketItemkey.
- Parameters
-
◆ setBundle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setBundle |
( |
|
$blBundle | ) |
|
Marks if item is bundle ( oxbasketitem::blBundle )
- Parameters
-
bool | $blBundle | if item is bundle |
◆ setFromOrderArticle()
OxidEsales\EshopCommunity\Application\Model\BasketItem::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
-
\OxidEsales\Eshop\Application\Model\OrderArticle | $oOrderArticle | order article |
◆ setLanguageId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setLanguageId |
( |
|
$iLanguageId | ) |
|
Set language Id, reload basket content on language change.
- Parameters
-
integer | $iLanguageId | language id |
◆ setPersParams()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setPersParams |
( |
|
$aPersParam | ) |
|
Stores items persistent parameters ( oxbasketitem::_aPersistentParameters )
- Parameters
-
array | $aPersParam | items persistent parameters |
◆ setPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setPrice |
( |
|
$oPrice | ) |
|
Sets $this->_oPrice
- Parameters
-
◆ setRegularUnitPrice()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setRegularUnitPrice |
( |
|
$oRegularUnitPrice | ) |
|
Set regular unit price
- Parameters
-
\OxidEsales\Eshop\Core\Price | $oRegularUnitPrice | regular price |
◆ setSelectList()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setSelectList |
( |
|
$aSelList | ) |
|
|
protected |
Stores item select lists ( oxbasketitem::aSelList )
- Parameters
-
array | $aSelList | item select lists |
◆ setSkipDiscounts()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setSkipDiscounts |
( |
|
$blSkip | ) |
|
Used to set "skip discounts" status for basket item
- Parameters
-
bool | $blSkip | set true to skip discounts |
◆ setStockCheckStatus()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setStockCheckStatus |
( |
|
$blStatus | ) |
|
Sets stock control mode
- Parameters
-
bool | $blStatus | stock control mode |
◆ setWishArticleId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setWishArticleId |
( |
|
$sArticleId | ) |
|
Wish article Id setter
- Parameters
-
string | $sArticleId | wish article id |
◆ setWishId()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setWishId |
( |
|
$sWishId | ) |
|
Wish user id setter
- Parameters
-
◆ setWrapping()
OxidEsales\EshopCommunity\Application\Model\BasketItem::setWrapping |
( |
|
$sWrapId | ) |
|
Product wrapping paper id setter
- Parameters
-
string | $sWrapId | wrapping paper id |
◆ $_aChosenSelectlist
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_aChosenSelectlist = [] |
|
protected |
◆ $_aPersistentParameters
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_aPersistentParameters = [] |
|
protected |
◆ $_aSelList
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_aSelList = [] |
|
protected |
◆ $_blBundle
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_blBundle = false |
|
protected |
◆ $_blCheckArticleStock
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_blCheckArticleStock = true |
|
protected |
◆ $_blIsDiscountArticle
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_blIsDiscountArticle = false |
|
protected |
◆ $_blSkipDiscounts
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_blSkipDiscounts = false |
|
protected |
◆ $_blSsl
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_blSsl = null |
|
protected |
◆ $_dAmount
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_dAmount = 0.0 |
|
protected |
◆ $_dWeight
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_dWeight = 0 |
|
protected |
◆ $_iLanguageId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_iLanguageId = null |
|
protected |
◆ $_oArticle
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_oArticle = null |
|
protected |
◆ $_oPrice
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_oPrice = null |
|
protected |
◆ $_oRegularUnitPrice
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_oRegularUnitPrice = null |
|
protected |
◆ $_oUnitPrice
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_oUnitPrice = null |
|
protected |
◆ $_sDimageDirNoSsl
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sDimageDirNoSsl = null |
|
protected |
◆ $_sDimageDirSsl
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sDimageDirSsl = null |
|
protected |
◆ $_sIcon
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sIcon = null |
|
protected |
◆ $_sIconUrl
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sIconUrl = null |
|
protected |
◆ $_sLink
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sLink = null |
|
protected |
◆ $_sNativeShopId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sNativeShopId = null |
|
protected |
◆ $_sProductId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sProductId = null |
|
protected |
◆ $_sShopId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sShopId = null |
|
protected |
◆ $_sTitle
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sTitle = null |
|
protected |
◆ $_sVarSelect
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sVarSelect = null |
|
protected |
◆ $_sWishArticleId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sWishArticleId = null |
|
protected |
◆ $_sWishId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sWishId = null |
|
protected |
◆ $_sWrappingId
OxidEsales\EshopCommunity\Application\Model\BasketItem::$_sWrappingId = null |
|
protected |
◆ $basketItemKey
OxidEsales\EshopCommunity\Application\Model\BasketItem::$basketItemKey = null |
|
protected |
The documentation for this class was generated from the following file: