int ID

The method GetByID returns parameters of an order.


ID The order ID.

Returned values

Returns an associated array with the following keys.

Key Description
ID The order ID.
LID The ID of the site from which an order originates.
PERSON_TYPE_ID Payer type of the visitor who made The order (customer).
PAYED Specifies whether the order is paid (Y/N).
DATE_PAYED The date of the order payment.
EMP_PAYED_ID The ID of the user (web shop member) who has set The PAYED flag.
CANCELED Specifies whether the order is canceled (Y/N).
DATE_CANCELED The date of the order cancellation.
EMP_CANCELED_ID The ID of the user (web shop member) who has set the CANCELED flag.
REASON_CANCELED Text description of the order cancellation reason.
STATUS_ID The order status ID.
DATE_STATUS The date the order status changed.
EMP_STATUS_ID The ID of The user (web shop member) who has set The current STATUS_ID.
PRICE_DELIVERY Cost of The order delivery.
ALLOW_DELIVERY Specifies whether the order can be shipped (Y/N).
DATE_ALLOW_DELIVERY The date when the order was subjected for shipment.
EMP_ALLOW_DELIVERY_ID The ID of the user (web shop member) who has set the current ALLOW_DELIVERY status.
PRICE Total order price.
CURRENCY Currency of the order price.
DISCOUNT_VALUE Total discount value.
USER_ID The user ID of the customer.
PAY_SYSTEM_ID Pay system to handle the payment.
DELIVERY_ID The ID of a delivery service that will handle the order shipment.
DATE_INSERT The date the order was created.
DATE_UPDATE The date the order was last modified.
USER_DESCRIPTION Customer's order description.
ADDITIONAL_INFO Additional information on the order.
PS_STATUS Specifies that the order has been successfully paid (Y/N). Available only for those pay systems which can automatically notify of their orders state.
PS_STATUS_CODE Code of the pay system status (depends on the pay system).
PS_STATUS_DESCRIPTION Description of the pay system order payment result.
PS_STATUS_MESSAGE Message returned from the pay system.
PS_SUM Amount of money which was actually paid via the pay system.
PS_CURRENCY Payment currency.
PS_RESPONSE_DATE The date when the pay system status was received.
COMMENTS Auxiliary comments.
TAX_VALUE Total amount of tax.
STAT_GID The event parameter for use in the Statistics module.
DATE_INSERT_FORMAT The date the order was created (in the current site format).


if (!($arOrder = CSaleOrder::GetByID($ORDER_ID)))
   echo "Cannot find order with ID=".$ORDER_ID;
   echo "<pre>";
   echo "</pre>";
© «Bitrix24», 2001-2023