Update
int CSaleLocation::Update( int ID, array arFields );
The method Update replaces the location parameters with the new ones from the supplied array. The location country and city are updates as well.
Parameters
Parameter | Description |
---|---|
ID | The location ID. |
arFields | Assosiated array of the location parameters. The following keys are possible:
|
Returned values
Returns the modified location ID on success, or false otherwise.
Example
<? $arFields = array( "SORT" => 100, "COUNTRY_ID" => 8, "WITHOUT_CITY" => "N" ); $arCity = array( "NAME" => "Paris", "SHORT_NAME" => "Paris", "fr" => array( "LID" => "fr", "NAME" => "Paris", "SHORT_NAME" => "Paris" ), "en" => array( "LID" => "en", "NAME" => "Paris", "SHORT_NAME" => "Paris" ) ); $arFields["CITY"] = $arCity; if (!CSaleLocation::Update(6, $arFields)) echo "error updating location"; ?>
© «Bitrix24», 2001-2024