Connecting a WordPress + WooCommerce store to ILFF
See also: Delivery widget for the cart · ILFF API · All CMS modules
Download the module ilff-woocommerce.zip
The plugin «ILFF: доставка и фулфилмент» (ILFF: delivery and fulfilment) links your WooCommerce store with the ILFF service:
- ILFF delivery methods appear in the checkout: by courier to the door (separately for each carrier) and to a pickup point, with the price and delivery time; the shopper chooses the pickup point on a map;
- 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 store;
- stock, weight and dimensions of products are passed from ILFF to the store;
- cancelling an order in the store cancels the request in ILFF.
The store always starts the exchange: the plugin itself calls the ILFF service with the API key, and you do not need to open the store to us.
You need:
- WordPress 6.2 or newer and WooCommerce 8 or newer;
- PHP 7.4 or newer (tested on PHP 8.2);
- the store currency is the Russian rouble: ILFF calculates delivery and order amounts in roubles;
- the classic checkout (details in step 4);
- store administrator rights and access to the ILFF client account.
The connection takes 15–20 minutes.
The plugin 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. WordPress and WooCommerce menus are named in English.
Step 1. Connection in the ILFF client account
Client account → the Интеграции (Integrations) tab → expand the Интернет-магазин (Online store) block.
- Платформа (Platform): choose WooCommerce.
- Адрес магазина (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 6). We recommend leaving the checkbox on.
- Press Подключить (Connect). The account creates the connection. It does not call the store at this point: the plugin 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 store by it. The код клиента (client code) for the pickup point widget is in the same place; add the store domain to the домены виджета (widget domains) list.
Step 2. Installing the plugin
- Download the archive
ilff-woocommerce.zipfrom the module page on the ILFF site or get it from your manager. Do not unpack the archive. - In the WordPress admin panel open Plugins → Add New → Upload Plugin, choose the archive and press Install Now.
- Press Activate.
On activation the plugin itself:
- creates the order queue table;
- schedules the ILFF task in WP-Cron once an hour: order resending, tracking numbers, statuses, stock;
- adds the ILFF tab to WooCommerce → Settings and the delivery methods «Курьер ILFF» (ILFF courier) and «Пункт выдачи ILFF» (ILFF pickup point).
Step 3. Plugin settings
WooCommerce → Settings → ILFF.
Связь с ILFF (Connection to ILFF)
- Ключ 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 other settings only, leave the field empty.
- Адрес сервиса ILFF (ILFF service address): already filled in, no need to change it.
- Код клиента ILFF для виджета (ILFF client code for the widget): the code from the client account. Without the code the «Пункт выдачи ILFF» method is not shown in the checkout.
- Вариант настроек калькулятора (Calculator settings profile): 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 it is taken from the ILFF service next to the service address.
Заказы (Orders)
- Статус, при котором заказ уходит в ILFF (Status at which the order goes to ILFF): Processing by default. The order goes when it moves to this status. If you check the order or wait for payment, choose the status you move the order to after the check.
- Статусы отмены (Cancellation statuses): Cancelled by default. Moving a sent order to such a status cancels the request in ILFF.
- Оплата при получении (Cash on delivery): the payment methods with which the shopper pays the courier or at the pickup point. The default is Cash on delivery (cod). Such orders go to ILFF with cash on delivery, the others are treated as prepaid.
Статусы заказа по статусам ILFF (Order statuses by ILFF statuses). The value «Не менять» (Do not change) leaves the order status as it is:
| Setting | ILFF statuses | Default |
|---|---|---|
| Передан в доставку (handed over for delivery) | Передан в КС | Не менять |
| Доставлен (delivered) | Доставлен клиенту, Выдан, Частичная выдача | Completed |
| Отменён (cancelled) | Отменен, Аннулирован | Cancelled |
| Возврат (return) | Возврат принят, Полный отказ | Не менять |
WooCommerce treats the Refunded status as a refund of the full order amount, so the default for a return is «Не менять». If the store has no "handed over for delivery" status, you can add one with a custom order status plugin and choose it here.
Остатки, вес и габариты (Stock, weight and dimensions)
- Получать остатки из ILFF (Receive stock from ILFF): free stock is written to the stock of the product (or variation), 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. Stock management for such products is switched on automatically.
- Получать вес и габариты товаров (Receive product weight and dimensions): the weight and size measured at the ILFF warehouse are written to the products in the store units, only where we have them filled in.
- Получать вес и габариты заказа (Receive order weight and dimensions): the weight, dimensions and number of packages of the picked order are shown in the ILFF block of the order page.
Press Save changes. The plugin checks the connection at once: you will see «Связь с ILFF есть, клиент: …» (connected to ILFF, client: …) at the top. Then press Передать список товаров сейчас (Send the product list now) in the Состояние обмена (Exchange state) block: the products go to ILFF for linking (step 6), and with stock switched on the stock is reconciled at once.
Step 4. Delivery methods and the checkout
Delivery methods. WooCommerce → Settings → Shipping → open the shipping zone for Russia (or create a "Russia" zone with the region "Russia") → Add shipping method:
- Курьер ILFF: door delivery. The shopper sees a separate option for each carrier: «Курьер до двери: СДЭК», «Курьер до двери: Курьер ILFF», at the cheapest rate of the carrier, with the delivery time. Russian Post rates, if the ILFF service calculates them for your store («Посылка», «Посылка онлайн», «Курьер онлайн»), are shown as separate options with their own names.
- Пункт выдачи ILFF: pickup points, parcel lockers and Russian Post offices.
The method name can be changed in its settings (the pencil in the method row). Switch off the store delivery methods with a fixed price in this zone if ILFF does the delivery.
The checkout must be classic. The button for choosing a pickup point on the map works in the classic cart and the classic checkout (the shortcodes [woocommerce_cart] and [woocommerce_checkout]). In new WooCommerce stores the Cart and Checkout pages are built from blocks by default: there the «Пункт выдачи ILFF» method is visible, but a point cannot be chosen and an order with it is not placed. Switch the pages to the classic view:
- Pages → Checkout → Edit.
- Select the Checkout block and press Switch to classic checkout in its panel (or replace the block with a Shortcode block containing
[woocommerce_checkout]). - Update the page. Do the same for the Cart page (
[woocommerce_cart]).
On the plugins page WooCommerce may show that the ILFF plugin is incompatible with the block checkout: this is exactly what it means.
Step 5. What the shopper sees
- The shopper enters the country Russia, the region and the city. The price of the courier and of pickup points is calculated by city, the street is not used in the calculation: it goes to ILFF together with the order.
- Курьер до двери (courier to the door): the carrier options with the price and delivery time.
- Пункт выдачи ILFF — выберите пункт на карте: от N ₽ (choose a point on the map, from N ₽): before a point is chosen, the lower bound of the price for the city is shown. Under the method there is a visible blue button Выбрать пункт на карте (choose a point on the map). Choosing this method also opens the map.
- In the ILFF widget window the shopper chooses a pickup point, a parcel locker or a post office on the map or in the list. After the choice the method changes to «Пункт выдачи ILFF СДЭК: адрес пункта» (or «Почта России: адрес отделения») with the exact price and delivery time. The button under it becomes Изменить пункт выдачи (change the pickup point).
- On the «Курьер» tab of the widget the shopper can choose a courier carrier and enter the address: the checkout selects the «Курьер до двери» option of that carrier, and the address is put into the street field.
- If the shopper changes the city, the chosen point is reset, and the method again offers to choose a point on the map.
- An order with a pickup point cannot be placed without a chosen point: the message «Выберите пункт выдачи» (choose a pickup point) appears.
If the shopper's city has no pickup points or post offices, the 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 pickup point, the rate and the point code are saved in the order. Place a test order with ILFF delivery, move it to the sending status and make sure the order has arrived in ILFF.
Step 6. Linking products
In the ILFF client account the Товары магазина (Store products) button in the "Интернет-магазин" block shows the store products sent by the plugin and their link to your products in ILFF. The link is matched first by barcode, then by SKU:
- barcode: the GTIN, UPC, EAN or ISBN field on the Inventory tab of the product (WooCommerce 9.2 and newer). In older versions the plugin takes the barcode from the custom field
_ean,_barcodeor_gtin, if your barcode plugin fills it in; - SKU: the SKU field.
| 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 in the store |
A variable product (size, colour) is passed as variations: each variation has its own SKU and barcode, and stock and orders go by variation. Set the barcode and SKU for each variation.
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 plugin resends the order itself.
The order in the store
The order page has an ILFF block on the right: the ILFF request number, the exchange state («передан» sent, «ждёт привязки товаров» waiting for product linking, «ждёт отправки» waiting to be sent), the ILFF status, the tracking number with a tracking link, the pickup point and rate, and with the «Получать вес и габариты заказа» checkbox on, the weight, dimensions and number of packages. The order notes get the entries «ILFF: создана заявка …» (request created), «ILFF: трек-номер …» (tracking number) and the reply to a cancellation.
Order cancellation
Moving an order to a cancellation status (step 3) 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 notes get the entry «ILFF: Заявка уже в работе…» (the request is already in work), contact your manager.
The WP-Cron task
The ILFF task runs once an hour:
- it resends orders that did not go at once (after a connection failure or from waiting for linking): after 1, 5, 15, 60 and 180 minutes, but not more often than the task runs;
- it fetches tracking numbers and order statuses: the tracking number is written to a note and to the ILFF block of the order, and the status changes by the table from step 3;
- it updates stock, weight and dimensions;
- once a day it sends the product list and reconciles all stock.
Orders go to ILFF at once when the status changes, even without the task.
WP-Cron runs when visitors come to the site. On a site with little traffic or with WP-Cron switched off (DISABLE_WP_CRON in wp-config.php) set up a system cron on the server that calls https://your-store/wp-cron.php or the command wp cron event run --due-now (WP-CLI) every 5–15 minutes. The time of the last runs and of the next run is shown in the Состояние обмена block on the ILFF tab.
Updating the plugin
Download the new archive and upload it the same way as on installation: Plugins → Add New → Upload Plugin. WordPress will offer Replace current with uploaded: agree. The settings, the order queue and the order data are kept.
Removing the plugin
Deactivating the plugin stops the ILFF task, the settings stay. Deleting the plugin (Plugins → Delete) erases its settings, the order queue and the ILFF delivery methods in the zones; request numbers, tracking numbers and pickup points in the orders stay.
If something does not work
| Message or symptom | Cause and solution |
|---|---|
| «Связи с ILFF нет: Неверный ключ API» (No connection to ILFF: wrong API key) | The key was entered with an error or replaced. Copy the key from the client account and save the settings |
| «Связи с ILFF нет: В личном кабинете ILFF не подключён магазин WooCommerce» (the WooCommerce store is not connected in the ILFF client account) | Step 1 is not done: choose the WooCommerce platform and press «Подключить» |
| «Связи с ILFF нет: Сервис ILFF не ответил» (the ILFF service did not respond) | The store server cannot reach ILFF: check outgoing HTTPS connections to port 8443 (the hosting may block them) |
| ILFF delivery methods are missing in the checkout | Check that the methods are added to the shipping zone and enabled, the country is Russia and the city is given |
| No «Пункт выдачи ILFF» method | The client code for the widget is not entered (step 3) |
| No «Выбрать пункт на карте» button, or a point cannot be chosen | The Cart and Checkout pages are built from blocks: switch them to the classic view (step 4). If the checkout theme is custom and the button still does not appear, tell your manager |
| The map opens but the points do not load | The store domain is not added to the widget domain list in the ILFF client account |
| «Не удалось разобрать адрес» (The address could not be parsed) | The delivery address has no city |
| An order did not arrive in ILFF | Check the order status and the «Статус, при котором заказ уходит в ILFF» setting, the ILFF block on the order page (an exchange error) and the "waiting for linking" block in the account. The order must have ILFF delivery |
| The tracking number and status do not arrive | The WP-Cron task does not run: see «последний запуск» (last run) in the «Состояние обмена» block and set up the server cron |
| Stock in the store differs from stock in the account | The store receives free stock: without the reserve, unsent orders and goods in receiving |
| Delivery prices are odd or there is no calculation | The store currency is not the rouble: the plugin is designed for a store in roubles |
The plugin writes exchange errors to the WooCommerce log (WooCommerce → Status → Logs, the ilff source), without the API key and shopper data. For other questions contact your ILFF manager.