AddCity
This class has been deprecated. It's recommended to use methods of class Bitrix\Sale\Location.
int CSaleLocation::AddCity( array arFields );
The method AddCity adds a new city.
Parameters
Parameter | Description |
---|---|
arFields | Associated array with parameters of the city to be added. The following
keys are possible:
|
Returned values
Returns the new city ID on success, or false otherwise.
Example
<? $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" ) ); $ID = CSaleLocation::AddCity($arCity); if (IntVal($ID)<=0) echo "Error adding city"; ?>
© «Bitrix24», 2001-2024