Connecting a 1C-Bitrix site to ILFF
See also: Delivery widget for the cart · ILFF API · All CMS modules
Download the module ilff.delivery.zip
The ILFF module links your online store on 1C-Bitrix with the ILFF service:
- our delivery methods appear in the checkout with the price, delivery time and a map of pickup points;
- an order with ILFF delivery goes to ILFF on its own when it gets the status you chose;
- the tracking number and order status are returned to the site;
- stock, weight and dimensions of products are passed from ILFF to the site;
- cancelling an order on the site cancels the request in ILFF.
The site always starts the exchange: the module itself calls the ILFF service with the API key, and you do not need to open the site to us.
You need a 1C-Bitrix edition with an online store (the «Интернет-магазин» and «Торговый каталог» modules), PHP 8, site administrator rights and access to the ILFF client account. The connection takes 15–20 minutes.
The module, the 1C-Bitrix admin panel and the ILFF client account are in Russian, so their labels are given below as they appear on the screen, with a translation in brackets.
Step 1. Connection in the ILFF client account
Client account → the Интеграции (Integrations) tab → expand the Интернет-магазин (Online store) block.
- Платформа (Platform): choose 1С-Битрикс.
- Адрес магазина (Store address): the site address, for example
shop.ru. - The Заказ с несвязанным товаром ждёт привязки (An order with an unlinked product waits for linking) checkbox: when it is on, an order with a product that is not yet linked to your product in ILFF is not accepted until you link it (step 5). Without the checkbox such a product is created in ILFF as a new item. We recommend leaving the checkbox on.
- Press Подключить (Connect). The account creates the connection. It does not call the site at this point: the module checks the link at step 3.
The Ключ API (API key) is shown at the top of the Интеграции tab. If it is missing, press Сгенерировать (Generate). You will need the key at step 3. Do not send it to anyone: the ILFF service recognises your site by it.
Step 2. Installing the module
- Download the module archive
ilff.delivery.zipfrom the module page on the ILFF site or get it from your manager. - Unpack the archive into the site directory
/local/modules/so that you get/local/modules/ilff.delivery/. If thelocal/modulesdirectory does not exist, create it. - In the admin panel open Marketplace → Установленные решения (Installed solutions), find ILFF: доставка и обмен заказами and press Установить (Install).
During installation the module itself:
- creates the delivery services «Доставка до двери ILFF» (ILFF door delivery) and «Пункты выдачи ILFF» (ILFF pickup points) (Магазин → Настройки → Службы доставки);
- adds service properties to the order: rate, pickup point, weight, dimensions and number of packages;
- connects the pickup point map on the checkout page;
- creates the exchange agents (step 6).
Step 3. Module settings
Admin panel → Настройки → Настройки продукта → Настройки модулей → ILFF: доставка и обмен заказами (Settings → Product settings → Module settings).
- Адрес сервиса ILFF (ILFF service address): already filled in, no need to change it.
- Ключ API клиента ILFF (ILFF client API key): the key from step 1. After saving, the field stays empty, the saved key is not shown. To change the settings only, leave the field empty.
- Статус, при котором заказ уходит в ILFF (Status at which the order goes to ILFF): by default «Принят, ожидается оплата» (Accepted, awaiting payment), so the order goes right after checkout. If you check the order first or wait for payment, choose the status you move the order to after the check, for example «Оплачен, формируется к отправке» (Paid, being prepared for shipment). The order goes when it moves to this status.
- Статусы сайта (Site statuses) for ILFF statuses. The empty value «Не менять» (Do not change) leaves the site status as it is:
| Setting | ILFF statuses |
|---|---|
| Статус сайта: передан в доставку (handed over for delivery) | Передан в КС |
| Статус сайта: доставлен (delivered) | Доставлен клиенту, Выдан, Частичная выдача |
| Статус сайта: отменён (cancelled) | Отменен, Аннулирован |
| Статус сайта: возврат (return) | Возврат принят, Полный отказ |
During installation the module itself creates the statuses «Передан в доставку» and «Возврат» and sets the mapping: handed over for delivery → «Передан в доставку», delivered → «Выполнен», cancelled → the order is marked as cancelled (the «Отменить заказ (флаг «Отменён»)» option), return → «Возврат». If you have already chosen statuses, they are not changed.
- Способы оплаты при получении (Cash on delivery payment methods): tick the methods that the shopper pays to the courier or at the pickup point, for example «Наличные курьеру» or «Наложенный платёж». Only they will have cash on delivery in the request, and only for an unpaid order. The other orders are treated as prepaid, even if the online payment has not arrived yet.
- Checkboxes:
- Получать остатки из ILFF (Receive stock from ILFF): free stock is written to the site, that is the stock at the ILFF warehouse minus the reserve and the orders that have not reached ILFF yet. Goods in the receiving area of the warehouse are not part of the stock until they are put away;
- Получать вес и габариты товаров (Receive product weight and dimensions): the weight and size of products from ILFF are written to the site, only for products where we have them filled in;
- Получать вес и габариты заказа (Receive order weight and dimensions): after picking, the actual weight, dimensions and number of packages are written to the order properties;
- Доставка в карточке товара (Delivery on the product page; off by default): the "from" price of courier delivery and delivery to a pickup point for the store city is shown under the buy button.
- Окно выбора пункта выдачи (Pickup point window): «Виджет ILFF» (the default: map, carriers and prices) or «Простое окно» (a simple window with a list and a map). For the widget, enter the Код клиента ILFF для виджета (ILFF client code for the widget) from the client account and add the site domain to the widget domain list in the account. Without the code the simple window opens. Вариант настроек калькулятора (Calculator settings profile) is the profile code from the ILFF client account, for example
site2, if this site has its own delivery settings. Empty means the default settings. Free delivery thresholds («Бесплатно для получателя от суммы товаров») are set in the ILFF client account, and when the goods total reaches the threshold the module shows delivery as «Бесплатно» (Free). - Адрес подсказки городов (City suggestion address): optional. Empty means the suggestion is taken from the ILFF service next to the service address.
- Tick Передать список товаров сейчас (Send the product list now) and press Сохранить и проверить связь (Save and check the connection). At the top you will see «Связь с ILFF есть, клиент: …» (connected to ILFF, client: …), the number of products sent and, if stock is on, the number of stock values updated.
Step 4. Delivery services and the checkout
- Switch off the site delivery methods with a fixed price if ILFF does the delivery. Otherwise the shopper sees them next to ours with their own price.
- If necessary, set restrictions in the ILFF delivery services: by payment methods, locations or order total.
- The shopper's location must be filled in the order: the price is calculated from it (for a courier by city, the street does not affect the price). The city is taken from the «Местоположение» (Location) property together with the region and district, so villages with the same name in different regions are not mixed up. The street is taken from the property with the «Адрес» flag or from the property with the code
ADDRESS, and it goes into the ILFF request as it is.
Delivery to villages and settlements needs a location directory with villages: by default Bitrix loads only cities, and a shopper from a village sees «Местоположение не найдено» (Location not found). Load it: «Магазин → Настройки → Местоположения → Импорт местоположений», the source is the 1C-Bitrix server, the country is Russia, the level of detail is «с сёлами» (with villages); a full load takes several minutes.
- Place a test order on the site with ILFF delivery and make sure that the delivery price and time are shown and the order has arrived in ILFF.
- If the ILFF delivery price could not be calculated or no pickup point is chosen, an order with this service is not placed: the shopper sees «Доставка ILFF: …. Выберите другой пункт или способ доставки.» (choose another point or delivery method). This way the order does not go out with delivery at 0 ₽.
If the shopper's city has no pickup points or post offices, the pickup point window (the ILFF widget) opens the map at the address point and shows the nearest points of neighbouring cities with the distance; the price is calculated to the chosen point. The courier price is always calculated by city. Before a point is chosen, the «Пункты выдачи ILFF» service shows the price «от N ₽» (from N ₽; for villages, by the nearest points), and the exact price appears after the choice on the map.
Step 5. Linking products
In the ILFF client account the Товары магазина (Store products) button in the "Интернет-магазин" block shows the site products sent by the module and their link to your products in ILFF. The link is matched first by barcode, then by SKU (the ARTNUMBER property).
| Status | What to do |
|---|---|
| Связан (Linked) | Nothing, the link is saved |
| Подобран (Matched) | Check and confirm |
| Несколько совпадений (Several matches) | Choose the right product manually |
| Не найден (Not found) | Choose a product manually or fill in the barcode or SKU on the site |
If an order is waiting for linking, a banner with the number of such orders appears at the top of the Интеграции tab, and the "Интернет-магазин" block shows a table with the orders and products. After linking, the module resends the order itself.
Step 6. Agents and cron
The module works through Bitrix agents:
| Agent | How often | What it does |
|---|---|---|
| Досылка заказов (order resending) | every 5 minutes | resends orders that did not go at once: after a connection failure or from waiting for linking |
| Трек, статусы, остатки (tracking, statuses, stock) | every 15 minutes | fetches tracking numbers, statuses, order weight and dimensions, stock and product weight |
| Товары (products) | once a day | sends the product list and reconciles all stock |
An order goes to ILFF at once when the status changes, the agent is needed only for retries. By default Bitrix runs agents on visitor hits. On a site with little traffic set up agents to run through cron (bitrix/modules/main/tools/cron_events.php), otherwise stock and tracking numbers will lag. The «Запуск агентов» line at the bottom of the module settings shows how they are run now, and «последний запуск» (last run) shows whether each agent works.
What the shopper sees
- Доставка до двери ILFF: a courier and Russian Post «Курьер онлайн», the cheapest rate is chosen.
- Пункты выдачи ILFF: CDEK and 5Post pickup points and parcel lockers and Russian Post offices on a map. Until a point is chosen, the delivery price is 0 with the caption «Выберите пункт выдачи на карте» (choose a pickup point on the map).
- The price and delivery time are calculated from the weight and dimensions of the cart and the shopper's address.
How the exchange runs afterwards
- Orders: an order with ILFF delivery goes when it moves to the status from the «Статус, при котором заказ уходит в ILFF» setting. If the ILFF service did not respond, the order stays in the queue and the agent resends it: after 1, 5, 15, 60 and 180 minutes.
- Cancellation: cancelling an order on the site cancels the request in ILFF until it has been handed over to the carrier; a picked order goes back to storage. If the request is already with a carrier that accepts cancellation (Dalli, 5Post), the cancellation is passed to it and the order returns to the warehouse. With other carriers a request in work is not cancelled on its own: the order comment shows «ILFF: Заявка уже в работе…» (the request is already in work), contact your manager.
- Tracking number and status: the tracking number is written to the order shipment, and the status changes by the table from step 3. The agent passes them every 15 minutes. The module provides the parcel tracking link at the carrier through the standard Bitrix tracking: the shopper sees it next to the tracking number in their account, and it can be inserted into order emails.
- Stock, weight and dimensions: written by the agent if the checkboxes are on.
Updating the module
- Download the new module archive from this page and unpack it into the
/local/modules/directory of the site over the old version (theilff.deliverydirectory). - In the admin panel open Marketplace → Установленные решения, press Удалить (Delete) for the ILFF module, then Установить (Install). The module settings, delivery services and order properties are kept: reinstalling updates only the checkout scripts and handlers.
- Open the module settings and press Сохранить и проверить связь.
If something does not work
| Message or symptom | Cause and solution |
|---|---|
| «Нет связи: Неверный ключ API» (No connection: wrong API key) | The key was entered with an error or replaced. Copy the key from the client account and save the settings |
| «Нет связи: В личном кабинете ILFF не подключён магазин 1С-Битрикс» (the 1C-Bitrix store is not connected in the ILFF client account) | Step 1 is not done: choose the 1С-Битрикс platform and press «Подключить» |
| «Нет связи: Сервис ILFF не ответил» (the ILFF service did not respond) | The site cannot reach ILFF: check outgoing HTTPS connections from the site server to port 8443 |
| Our delivery methods are missing in the checkout | Check that the ILFF delivery services are active and not hidden by restrictions |
| «Не удалось разобрать адрес» (The address could not be parsed) | The location or the street and house are not filled in the order |
| An order did not arrive in ILFF | Check the order status and the «Статус, при котором заказ уходит в ILFF» setting, the «Очередь заказов» (order queue) line in the module settings and the "waiting for linking" block in the account. The order must have ILFF delivery |
| Stock on the site differs from stock in the account | The site receives free stock: without the reserve, unsent orders and goods in receiving. Stock is updated by the agent, check its last run |
| The order status on the site does not change | «Не менять» is chosen for this ILFF status (step 3), or the «Трек, статусы, остатки» agent has not run for a long time |
| «Доставка ILFF: … Выберите другой пункт или способ доставки» in the checkout | The delivery price was not calculated (for example, the carrier has no points in the city) or no pickup point is chosen. Choose another point or delivery method |
| A simple window with a list opens instead of the widget | The client code for the widget is not entered or the site domain is not added to the widget domain list in the client account |
| On a phone the bottom of the page jumps when the checkout is scrolled | This is not the module but the fixed basket bar of the template (the «Корзина-полоска» component, pinned to the bottom): when the address bar hides, it recalculates the bottom padding of the page. Add a constant padding to the site template CSS, for example @media (max-width:767px){body:has(.bx-basket-fixed){padding-bottom:36px!important}}, or do not pin the basket on mobile |
For other questions contact your ILFF manager.