Documentation

GetByID

array
CSaleDelivery::GetByID(
  int ID
);

The method GetByID returns parameters of the delivery service.

Parameters

ParameterDescription
ID The ID of the delivery service whose parameters are to be returned.

Returned values

Returns the associated array with the following keys.

Key Description
ID The delivery service ID. 
NAME Name of the delivery service.
LID The ID of the site to which this service is bound.
PERIOD_FROM Minimum time of delivery.
PERIOD_TO Maximum time of delivery.
PERIOD_TYPE Time of delivery measurement unit: H - hours, D - days, M - months.
WEIGHT_FROM Minimum order weight that this delivery service can handle (measurement unit must be common within the site).
WEIGHT_TO Maximum order weight that this delivery service can handle (measurement unit must be common within the site).
ORDER_PRICE_FROM Minimum order price that this delivery service can handle.
ORDER_PRICE_TO Maximum order price that this delivery service can handle.
ORDER_CURRENCY Currency in which both ORDER_PRICE_FROM and ORDER_PRICE_TO are specified.
ACTIVE Delivery service active state flag (Y/N).
PRICE Cost of delivery.
CURRENCY Currency of the cost.
SORT Sort weight.
DESCRIPTION Delivery service description.

Example


<?
// $DELIVERY_ID - delivery service ID

$arDeliv = CSaleDelivery::GetByID($DELIVERY_ID);
if ($arDeliv)
{
   echo "Delivery with \"".
        $arDeliv["NAME"]."\" costs ".
        CurrencyFormat($arDeliv["PRICE"],
        $arDeliv["CURRENCY"]);
}
?>
© «Bitrix24», 2001-2024