OrderBase
\Bitrix\Sale\OrderBase base class for handling an order. Operates only with shopping cart, properties, discounts and taxes.
Chain of inheritance
\Bitrix\Sale\OrderBase > \Bitrix\Sale\Internals\Entity
Class methods
Method | Description | Available from version |
---|---|---|
appendBasket | Прикрепляет корзину к новому заказу. | |
applyDiscount | Applies calculated discounts to an order. | |
create | Creates an order object. | |
delete | Cancels and deletes an order. | |
deleteNoDemand | Directly deletes order from database. | |
doFinalAction | Calculates discounts, taxes and applies them to an order. | |
getAvailableFields | Returns array of fields that can be set using the methods setField() and setFields() . |
|
getBasket | Returns a shopping cart object attached to an order. | |
getCurrency | Returns order currency. | |
getDateInsert | Returns date of created order. | |
getDeliveryLocation | Returns delivery price for all locations. | |
getDeliveryPrice | Returns delivery price for all orders. | |
getDiscount | Returns object of class \Bitrix\Sale\DiscountBase . |
|
getDiscountPrice | Returns discount/extra charge value for an order. | |
getHash | Returns order cache. | |
getId | Returns order ID. | |
getPersonTypeId | Returns order payer type ID for an associated order. | |
getPrice | Returns order price with discounts/extra charges. | |
getPropertyCollection | Returns collection properties, associated with an order | |
getRegistryType | Returns register type for an object. | |
getSiteId | Returns site ID that processed order checkout. | |
getSumPaid | Returns an already paid order price. | |
getTax | Returns object of class \Bitrix\Sale\Tax . |
|
getTaxLocation | Returns location ID used for tax calculation. | |
getTaxPrice | Returns tax value for an order. | |
getTaxValue | Returns tax rate for an order. | |
getUfId | Returns user field IDs. By default null . |
|
getUserId | Returns buyer ID. | |
getVatRate | Returns VAT rate that was applied. | |
getVatSum | Returns total VAT. | |
isAllowDelivery | Returns value true , when delivery is permitted for an order (otherwise returns false ). |
|
isCanceled | Returns true , when order is cancelled (otherwise returns false ). |
|
isChanged | Returns true , when order is changed (otherwise returns false ). |
|
isExternal | Returns true , when order was received externally (e. g.from third-party accounting services). Otherwise, returns false . |
|
isMarked | Returns true , when order was marked (otherwise returns false ). Orders are marked only in cases of errors. |
|
isNotEmptyBasket | Returns true , when shopping cart is not empty. Otherwise, returns false . |
|
isPaid | Returns true , when order is paid (otherwise returns false ). |
|
isShipped | Returns true , when order was shipped (otherwise returns false ). |
|
isUsedVat | Returns true , when VAT is used (otherwise returns false ). |
|
load | Loads order by ID and returns object (or null ). |
|
loadByAccountNumber | Loads order by its number and returns an object (or null ). |
|
loadByFilter | Returns array of order objects (or null ). |
|
loadPropertyCollection | Loads collection of property values, associated to an order from database. | |
refreshData | Refreshes calculated order data. | |
refreshVat | Recalculates taxes. | |
resetData | Resets order data. | |
resetTax | Resets taxes. | |
save | Saves an order. | |
setBasket | Attaches shopping cart to a new order and refreshes it. Upon attempting to associate shopping cart to existing order, throws an exception: \Bitrix\Main\NotSupportedException . |
|
setPersonTypeId | Sets payer type ID for an order. | |
verify | Verifies order and associated entities. |
Methods for parent class \Bitrix\Sale\Internals\Entity
Method | Description | Available from version |
---|---|---|
doFinalAction | Abstract method for implementing "Final" calculation logic. | |
getAvailableFields | Returns array with fields set using methods setField() and setFields() . |
|
getAvailableFieldsMap | Returns array with fields set using methods setField() and setFields() . Array keys are values getAvailableFields. |
|
getField | Returns values for the field $name . |
|
getFieldValues | Returns array with fields with values. | |
getId | Returns entity ID. | |
initField | Initializes field by value. The object is not deemed as updated. | |
initFields | Itinializes fields by values. The object is not deemed as updated. | |
isChanged | Checks if entity is updated. When updated, returns true , otherwise false . |
|
isMathActionOnly | Checks if current data calculations are performed (provider data is not requested). If yes, returns true , otherwise false . |
|
setField | Sets value for the field $name . |
|
setFields | Initilizes fields by values. The object is not deemed as updated. | |
setMathActionOnly | Disables request to provider when executing calculations. | |
verify | Verifies if object is correct. Returns object \Bitrix\Sale\Result . |
© «Bitrix24», 2001-2024