Documentation

Basket

\Bitrix\Sale\Basket class for handling shopping cart.


Chain of descendants (within subspace \Bitrix\Sale)

Basket > BasketBase > BasketItemCollection > Internals\EntityCollection > Internals\CollectionBase

Methods for parent class \Bitrix\Sale\BasketBase

MethodDescription Available from version
createCreates shopping cart for the site $siteId.
getBasePriceReturns general product cost without discounts and extra charges.
getExistsItemByItemSearch by item of the same product in shopping cart. Method returns shopping cart item on success.
getFUserIdReturns shopping cart owner ID (buyer).
getItemByBasketCodeReturns shopping cart item by ID.
getOrderableItemsReturns updated shopping cart for checkout, removing the items reserved or unavailable for purchase.
getPriceReturns general cost for product with discounts and extra charges.
getRegistryTypeReturns type of register for an object.
getSiteIdReturns site ID with associated shopping cart.
getVatRateAllows getting VAT rate for products.
getVatSumReturns general VAT amount for all products in shopping cart.
getWeightReturns shopping cart weight.
loadItemsForFUserLoads user shopping cart for specific site.
refreshRefreshes data for products.
saveSaves shopping cart.
setFUserIdSets shopping cart owner ID (buyer).
setOrderAssigns order to shopping cart.
verifyVerifies product data.

Methods for parent class \Bitrix\Sale\BasketItemCollection

MethodDescription Available from version
createItemCreates and adds an item into a collection.
getBasketAbstract method. Returns shopping cart with specified collection.
getBasketItemsReturns a items collection.
getExistsItemReturns an item from collection (or null).
getItemByBasketCodeReturns an item from collection by item code.
getItemByIdReturns an item from collection by item ID.
getOrderReturns order, associated to shopping cart.
getOrderIdReturns order ID with collection.
loadFromArrayLoads items from array.

Method for parent class \Bitrix\Sale\Internals\EntityCollection

MethodDescription Available from version
clearCollectionDeletes all collection items.
doFinalActionExecutes final actions.
getIndexByIdSearches item in collection by ID and returns its internal index.
getItemByIdSearches item in collection by ID and returns it.
getItemByIndexSearches item in collection by internal index and returns it.
isAnyItemDeletedChecks if a collection item was deleted.
isChangedChecks if collection was updated. Returns true or false.
isCloneChecks if collection was cloned. Returns true or false.
verifyVerifies collection validly. Returns object \Bitrix\Sale\Result.

Methods for parent class \Bitrix\Sale\Internals\CollectionBase

MethodDescription Available from version
countReturns number of object items.
currentReturns current item.
getIteratorReturns external iterator.
isEmptyChecks collection for emptiness. When collection doesn't contain any items, returns true (otherwise, false).
keyReturns index for current collection item.
nextMoves collection selection to the next item.
offsetExistsDefines, if specified offset exists (key).
offsetGetReturns specified offset (key).
offsetSetSets value for this offset.
offsetUnsetResets offset value.
rewindRewinds selection to the first collection item.
validChecks, if collection contains valid items.


© «Bitrix24», 2001-2024
Up