Bitrix Site Manager

CSaleLocation::AddLocation

int
CSaleLocation::AddLocation(
  array arFields
);

The method AddLocation adds a new location given the existing city and country ID's.

Parameters

ParameterDescription
arFieldsAssosiated array of the location parameters. The following keys are possible:
  • SORT - sort weight;
  • COUNTRY_ID - the country ID;
  • CITY_ID - the city ID.

Return Values

Returns the new location ID on success, or false otherwise.

Example



<?
// Add a location: country with ID of 2 and city with ID of 10
$ID = CSaleLocation::AddLocation(
      array(
         "COUNTRY_ID" => 2,
         "CITY_ID" => 10
         )
      );
?>