BasketItem extends BasketItemBase
Class BasketItem
Table of Contents
Constants
- TYPE_SERVICE = 2
- TYPE_SET = 1
Methods
- canBuy() : bool
- changeCurrency() : Result
- Change basket item currency.
- clearStartField() : bool
- create() : BasketItemBase
- createBundleCollection() : BundleCollection
- delete() : Result
- doFinalAction() : Result
- findItemByBasketCode() : BasketItemBase|null
- findItemById() : BasketItemBase|null
- findItemByXmlId() : $this|null
- formatQuantity() : float|string
- getAllFields() : array<string|int, mixed>
- getAvailableFields() : array<string|int, mixed>
- getAvailableFieldsMap() : array<string|int, mixed>|null
- getBasePrice() : float
- getBasePriceWithVat() : float|int
- getBasket() : BasketBase
- getBasketCode() : int|null|string
- getBundleBaseQuantity() : array<string|int, mixed>|bool
- getBundleCollection() : BundleCollection|null
- getCalculatedFields() : array<string|int, mixed>
- getCallbackFunction() : null|string
- getClassName() : string
- getCollection() : EntityCollection
- getCurrency() : string
- getCustomizableFields() : array<string|int, mixed>
- getDefaultPrice() : float
- getDiscountPrice() : float
- getField() : float|string|null
- getFieldsDescription() : array<string|int, mixed>
- getFieldValues() : array<string|int, mixed>
- getFinalPrice() : float|int
- getFUserId() : float|null|string
- getId() : int
- getInitialPrice() : float|int
- getInternalIndex() : null|int
- getMarkingCodeGroup() : string
- getNotPurchasedQuantity() : float
- getParentBasketItem() : BasketItem|null
- getParentBasketItemId() : int|null|string
- getPrice() : float
- getPriceWithVat() : float|int
- getProductId() : int
- getPropertyCollection() : BasketPropertiesCollectionBase|null
- getProvider() : ProviderBase|null|string
- getProviderEntity() : bool|mixed|null
- getProviderName() : ProviderBase|null
- getQuantity() : float
- getRegistryEntity() : string|void
- getRegistryType() : string
- getReservedQuantity() : float
- getReserveQuantityCollection() : ReserveQuantityCollection|null
- getSettableFields() : array<string|int, mixed>
- getSettableFieldsMap() : array<string|int, mixed>|null
- getVat() : float|int
- getVatRate() : float|null
- getVatUnit() : float|int
- getWeight() : float|null|string
- hasMeaningfulField() : bool
- initFields() : mixed
- isBarcodeMulti() : bool
- isBundleChild() : bool
- isBundleParent() : bool
- isChanged() : bool
- isClone() : bool
- isCustom() : bool
- isCustomPrice() : bool
- isDelay() : bool
- isExistPropertyCollection() : bool
- isMarkedFieldCustom() : bool
- isMathActionOnly() : bool
- isReservableItem() : bool
- isService() : bool
- isStartField() : bool
- isSupportedMarkingCode() : bool
- isVatInPrice() : bool
- load() : BasketItem|mixed
- markFieldCustom() : mixed
- save() : Result
- setCollection() : mixed
- setField() : Result
- setFields() : Result
- setMathActionOnly() : bool
- setOrderId() : mixed
- setPrice() : Result
- toArray() : array<string|int, mixed>
- unmarkFieldCustom() : mixed
- verify() : Result
Constants
TYPE_SERVICE
public
mixed
TYPE_SERVICE
= 2
TYPE_SET
public
mixed
TYPE_SET
= 1
Methods
canBuy()
public
canBuy() : bool
Tags
Return values
boolchangeCurrency()
Change basket item currency.
public
changeCurrency(string $currency) : Result
Parameters
- $currency : string
Return values
ResultclearStartField()
public
clearStartField() : bool
Return values
boolcreate()
public
static create(BasketItemCollection $basketItemCollection, mixed $moduleId, mixed $productId[, null $basketCode = null ]) : BasketItemBase
Parameters
- $basketItemCollection : BasketItemCollection
- $moduleId : mixed
- $productId : mixed
- $basketCode : null = null
Tags
Return values
BasketItemBasecreateBundleCollection()
public
createBundleCollection() : BundleCollection
Tags
Return values
BundleCollectiondelete()
public
delete() : Result
Tags
Return values
ResultdoFinalAction()
public
doFinalAction([mixed $hasMeaningfulField = false ]) : Result
Parameters
- $hasMeaningfulField : mixed = false
Return values
ResultfindItemByBasketCode()
public
findItemByBasketCode(mixed $basketCode) : BasketItemBase|null
Parameters
- $basketCode : mixed
Tags
Return values
BasketItemBase|nullfindItemById()
public
findItemById(mixed $id) : BasketItemBase|null
Parameters
- $id : mixed
Tags
Return values
BasketItemBase|nullfindItemByXmlId()
public
findItemByXmlId(mixed $xmlId) : $this|null
Parameters
- $xmlId : mixed
Tags
Return values
$this|nullformatQuantity()
public
static formatQuantity(mixed $quantity) : float|string
Parameters
- $quantity : mixed
Tags
Return values
float|stringgetAllFields()
public
static getAllFields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getAvailableFields()
public
static getAvailableFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getAvailableFieldsMap()
public
static getAvailableFieldsMap() : array<string|int, mixed>|null
Tags
Return values
array<string|int, mixed>|nullgetBasePrice()
public
getBasePrice() : float
Tags
Return values
floatgetBasePriceWithVat()
public
getBasePriceWithVat() : float|int
Tags
Return values
float|intgetBasket()
public
getBasket() : BasketBase
Return values
BasketBasegetBasketCode()
public
getBasketCode() : int|null|string
Tags
Return values
int|null|stringgetBundleBaseQuantity()
public
getBundleBaseQuantity() : array<string|int, mixed>|bool
Tags
Return values
array<string|int, mixed>|boolgetBundleCollection()
public
getBundleCollection() : BundleCollection|null
Tags
Return values
BundleCollection|nullgetCalculatedFields()
public
static getCalculatedFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getCallbackFunction()
public
getCallbackFunction() : null|string
Tags
Return values
null|stringgetClassName()
public
static getClassName() : string
Return values
stringgetCollection()
public
getCollection() : EntityCollection
Return values
EntityCollectiongetCurrency()
public
getCurrency() : string
Tags
Return values
stringgetCustomizableFields()
public
static getCustomizableFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getDefaultPrice()
public
getDefaultPrice() : float
Tags
Return values
floatgetDiscountPrice()
public
getDiscountPrice() : float
Tags
Return values
floatgetField()
public
getField(mixed $name) : float|string|null
Parameters
- $name : mixed
Tags
Return values
float|string|nullgetFieldsDescription()
public
static getFieldsDescription() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getFieldValues()
public
getFieldValues() : array<string|int, mixed>
Return values
array<string|int, mixed>getFinalPrice()
public
getFinalPrice() : float|int
Tags
Return values
float|intgetFUserId()
public
getFUserId() : float|null|string
Tags
Return values
float|null|stringgetId()
public
getId() : int
Return values
intgetInitialPrice()
public
getInitialPrice() : float|int
Tags
Return values
float|intgetInternalIndex()
public
getInternalIndex() : null|int
Return values
null|intgetMarkingCodeGroup()
public
getMarkingCodeGroup() : string
Tags
Return values
stringgetNotPurchasedQuantity()
public
getNotPurchasedQuantity() : float
Return values
floatgetParentBasketItem()
public
getParentBasketItem() : BasketItem|null
Return values
BasketItem|nullgetParentBasketItemId()
public
getParentBasketItemId() : int|null|string
Tags
Return values
int|null|stringgetPrice()
public
getPrice() : float
Tags
Return values
floatgetPriceWithVat()
public
getPriceWithVat() : float|int
Tags
Return values
float|intgetProductId()
public
getProductId() : int
Return values
intgetPropertyCollection()
public
getPropertyCollection() : BasketPropertiesCollectionBase|null
Tags
Return values
BasketPropertiesCollectionBase|nullgetProvider()
public
getProvider() : ProviderBase|null|string
Tags
Return values
ProviderBase|null|stringgetProviderEntity()
public
getProviderEntity() : bool|mixed|null
Tags
Return values
bool|mixed|nullgetProviderName()
public
getProviderName() : ProviderBase|null
Tags
Return values
ProviderBase|nullgetQuantity()
public
getQuantity() : float
Tags
Return values
floatgetRegistryEntity()
public
static getRegistryEntity() : string|void
Return values
string|voidgetRegistryType()
public
static getRegistryType() : string
Return values
stringgetReservedQuantity()
public
getReservedQuantity() : float
Tags
Return values
floatgetReserveQuantityCollection()
public
getReserveQuantityCollection() : ReserveQuantityCollection|null
Tags
Return values
ReserveQuantityCollection|nullgetSettableFields()
public
static getSettableFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getSettableFieldsMap()
public
static getSettableFieldsMap() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetVat()
public
getVat() : float|int
Tags
Return values
float|intgetVatRate()
public
getVatRate() : float|null
Tags
Return values
float|nullgetVatUnit()
public
getVatUnit([bool $withRound = true ]) : float|int
Parameters
- $withRound : bool = true
Tags
Return values
float|intgetWeight()
public
getWeight() : float|null|string
Tags
Return values
float|null|stringhasMeaningfulField()
public
hasMeaningfulField() : bool
Return values
boolinitFields()
public
initFields(array<string|int, mixed> $values) : mixed
Parameters
- $values : array<string|int, mixed>
Tags
isBarcodeMulti()
public
isBarcodeMulti() : bool
Tags
Return values
boolisBundleChild()
public
isBundleChild() : bool
Return values
boolisBundleParent()
public
isBundleParent() : bool
Tags
Return values
boolisChanged()
public
isChanged() : bool
Return values
boolisClone()
public
isClone() : bool
Return values
boolisCustom()
public
isCustom() : bool
Tags
Return values
boolisCustomPrice()
public
isCustomPrice() : bool
Tags
Return values
boolisDelay()
public
isDelay() : bool
Tags
Return values
boolisExistPropertyCollection()
public
isExistPropertyCollection() : bool
Return values
boolisMarkedFieldCustom()
public
isMarkedFieldCustom(string $name) : bool
Parameters
- $name : string
Return values
boolisMathActionOnly()
public
isMathActionOnly() : bool
Return values
boolisReservableItem()
public
isReservableItem() : bool
Return values
boolisService()
public
isService() : bool
Return values
boolisStartField()
public
isStartField([bool $isMeaningfulField = false ]) : bool
Parameters
- $isMeaningfulField : bool = false
Return values
boolisSupportedMarkingCode()
public
isSupportedMarkingCode() : bool
Tags
Return values
boolisVatInPrice()
public
isVatInPrice() : bool
Tags
Return values
boolload()
public
static load(BasketItemCollection $basket, mixed $data) : BasketItem|mixed
Parameters
- $basket : BasketItemCollection
- $data : mixed
Tags
Return values
BasketItem|mixedmarkFieldCustom()
public
markFieldCustom(string $name) : mixed
Parameters
- $name : string
Tags
save()
public
save() : Result
Tags
Return values
ResultsetCollection()
public
setCollection(EntityCollection $collection) : mixed
Parameters
- $collection : EntityCollection
setField()
public
setField(string $name, string|int|float $value) : Result
Parameters
- $name : string
-
Field name.
- $value : string|int|float
-
Field value.
Tags
Return values
ResultsetFields()
public
setFields(array<string|int, mixed> $fields) : Result
Parameters
- $fields : array<string|int, mixed>
Tags
Return values
ResultsetMathActionOnly()
public
setMathActionOnly([bool|false $value = false ]) : bool
Parameters
- $value : bool|false = false
Return values
boolsetOrderId()
public
setOrderId(mixed $id) : mixed
Parameters
- $id : mixed
Tags
setPrice()
public
setPrice(mixed $value[, bool $custom = false ]) : Result
Parameters
- $value : mixed
- $custom : bool = false
Tags
Return values
ResulttoArray()
public
toArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>unmarkFieldCustom()
public
unmarkFieldCustom(string $name) : mixed
Parameters
- $name : string
Tags
verify()
public
verify() : Result