Add
int CSaleDelivery::Add( array arFields );
The method Add adds a new delivery service.
Parameters
Parameter | Description |
---|---|
arFields | Associated array containing the delivery service parameters. In this array, the
keys are the parameter names, and the values are the delivery parameter
values. The following keys are possible:
|
Returned values
Returns the new record ID on success or false otherwise.
Example
<? $arFields = array( "NAME" => "By courier", "LID" => "en", "PERIOD_FROM" => 1, "PERIOD_TO" => 3, "PERIOD_TYPE" => "D", "WEIGHT_FROM" => 0, "WEIGHT_TO" => 2500, "ORDER_PRICE_FROM" => 0, "ORDER_PRICE_TO" => 10000, "ORDER_CURRENCY" => "EUR", "ACTIVE" => "Y", "PRICE" => 58, "CURRENCY" => "RUR", "SORT" => 100, "DESCRIPTION" => "Delivers within 3 to 10 business days". "after the order acceptance.", "LOCATIONS" => array( array("LOCATION_ID"=>1, "LOCATION_TYPE"=>"L"), array("LOCATION_ID"=>3, "LOCATION_TYPE"=>"G") ) ); $ID = CSaleDelivery::Add($arFields); if ($ID<=0) echo "Error adding a delivery service"; ?>
© «Bitrix24», 2001-2024