Documentation

AddLocation

This class has been deprecated. It's recommended to use methods of class Bitrix\Sale\Location.

int
CSaleLocation::AddLocation(
  array arFields
);

The method AddLocation adds a new location given the existing city and country IDs.

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.

Returned 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
         )
      );
?>

© «Bitrix24», 2001-2024
Up