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