Setting up delivery zones in 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Setting Up Delivery Zones in 1C-Bitrix

Delivery zones define which delivery services are available for each region and allow different tariffs to be set for different geographic areas. In 1C-Bitrix, zones are implemented through the "Locations" mechanism — a standard feature that requires a solid understanding to configure correctly.

How locations work in 1C-Bitrix

1C-Bitrix stores the location hierarchy in the b_sale_location and b_sale_location_name tables. The hierarchy is: country → region → district → city. Each location has a CODE (string, e.g. RU-77 for Moscow) and an ID.

Delivery services are linked to locations in the section Shop → Settings → Delivery Services → [service] → Locations. If a location is not added, the service is unavailable for it.

Configuring zones via the admin interface

Three zone configuration scenarios:

Scenario 1: Delivery to specific cities only Add specific cities to the service's location list. The service will only be available for those cities.

Scenario 2: Delivery nationwide except for certain regions Add the country as the parent location. The service is available everywhere. Exceptions are handled by separate logic in the handler (isCompatible()) or by creating multiple services.

Scenario 3: Different tariffs for different zones Create multiple instances of the same service: "Moscow delivery" (300 RUB), "Moscow region delivery" (500 RUB), "Russia-wide delivery" (by tariff). Each is linked to its own location zone.

Custom zones via restrictions

Standard 1C-Bitrix locations do not always match the delivery zones of real services. Custom zones are implemented via a mapping table:

// Zone table: city_name → zone_id
// Stored in an info block or custom table
$zoneTable = [
    'Москва'          => 'zone_1',
    'Санкт-Петербург' => 'zone_1',
    'Новосибирск'     => 'zone_2',
    // ...
];

// In the delivery service handler:
protected function calculateConcrete(\Bitrix\Sale\Shipment $shipment): \Bitrix\Sale\Delivery\CalculationResult
{
    $city = $this->getShipmentCity($shipment);
    $zone = ZoneMapper::getZone($city);
    $price = $this->getPriceByZone($zone);
    // ...
}

Linking costs to zones

Zone-based pricing is stored in the delivery service settings (b_sale_delivery_service_params) or in a separate custom table. Example structure:

Zone Min. days Max. days Price
zone_1 (Moscow, St. Petersburg) 1 2 300
zone_2 (million-plus cities) 2 4 450
zone_3 (rest of Russia) 3 7 650

Real-time zone checking

For dynamic zone determination based on the entered address — an AJAX request when the customer types a city in the order form. The zone is determined, and the list of available services and prices is updated without a page reload.

Limitations: when standard zones are insufficient

The standard 1C-Bitrix location mechanism relies on a city directory that does not always match reality. Common issues:

  • A customer types "Novosibirsk" — it's in the directory. They type "Novosib" or "NSK" — not found.
  • Delivery services zone their territories differently from administrative boundaries (e.g., Moscow region is one zone, but the inner suburbs within 30 km have a different tariff).
  • A zone-based calculation is needed, but the address contains only a street without a city — 1C-Bitrix cannot determine the zone.

In such cases, zone-based calculation is fully moved into the delivery service handler code, and the 1C-Bitrix location directory is used only for form display (not for service filtering).

Importing locations

During initial store setup from scratch or when restructuring the location hierarchy — bulk import via the standard agent \Bitrix\Sale\Location\Admin\LocationHelper or directly into the b_sale_location, b_sale_location_name tables. For the Russian market, the FIAS or KLADR directory converted to 1C-Bitrix format is used. Ready-made datasets are included in the 1C-Bitrix distribution and updated through platform updates.

Zones and currency

If the store operates in multiple countries — zones are linked to countries, and each country has its own currency. 1C-Bitrix supports multiple currencies on a site (Shop → Settings → Currencies). Delivery service tariffs are specified in the site's base currency; conversion is performed automatically using the central bank exchange rate. With custom zones, the cost is specified explicitly in the required currency in the service settings.

Implementation timelines

Configuring zones via the standard location interface — 1 working day. Custom zones with a mapping table and dynamic calculation — 2–3 days. Importing and updating the location directory (FIAS/KLADR) — 0.5 days.