Connecting a UMI.CMS store to ILFF
See also: Delivery widget for the cart · ILFF API · All CMS modules
Download the module ilff-umi.zip
The «ILFF» module links an online store on UMI.CMS (the "Online store" module) and the ILFF service:
- ILFF methods appear at the «Доставка» (Delivery) step: courier to the door, a pickup point chosen from the list of points of the city and Russian Post, with the price and delivery time;
- an order with an ILFF delivery method 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 and weight 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 module itself calls the ILFF service with the API key.
You need:
- UMI.CMS 24 with the "Online store" module (tested on UMI.CMS 24, the demomarket template);
- PHP 8.2 or 8.3 with the curl extension and access to the server console (for the installer);
- the store currency is the Russian rouble;
- site administrator rights and access to the ILFF client account.
The connection takes 20–30 minutes.
The module, the UMI.CMS 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 → the Интернет-магазин (Online store) block: Платформа (Platform) is UMI.CMS, Адрес магазина (Store address) is the site address. We recommend leaving the Заказ с несвязанным товаром ждёт привязки (An order with an unlinked product waits for linking) checkbox on. Press Подключить (Connect). The Ключ API (API key) is at the top of the tab; if it is missing, press Сгенерировать (Generate). Do not send it to anyone.
Step 2. Installing the module
- Download the archive
ilff-umi.zipfrom the module page on the ILFF site or get it from your manager. - Unpack the archive into the site root: the files go to
classes/components/emarket/…,templates/demomarket/…,ilff_cron.php,ilff_install.php. - In the server console, in the site root, run:
ILFF_API_KEY=<API key> php ilff_install.php.
The installer creates the data type and the delivery type «ILFF», three delivery methods, Курьер ILFF (ILFF courier), Пункт выдачи ILFF (ILFF pickup point) and Почта России (ILFF) (Russian Post), and the Артикул (Article) field for catalogue products, and prints the exchange task address. Running it again does not duplicate anything.
- The site template: in
templates/<your template>/php/emarket/delivery/choose/list.phtmloutput a method of the typeilffwith the templateemarket/delivery/choose/ilff(the archive has it for demomarket). If you have an XSLT template or your own markup of the delivery step, pass the task to the site developer or your ILFF manager.
Step 3. Module settings
Модули → Интернет-магазин → Доставка (Modules → Online store → Delivery): open an ILFF delivery method, the ILFF field group. The settings are taken from the first ILFF method that has an API key:
- Ключ API ILFF (ILFF API key), Адрес сервиса ILFF (ILFF service address, already filled in), Вариант настроек калькулятора (Calculator settings profile);
- Передавать в ILFF в статусах (Send to ILFF in statuses): UMI status codes separated by commas,
acceptedby default; - Отменять заявку в статусах (Cancel the request in statuses):
canceled,rejectedby default; - Статус «передан в службу доставки» (handed over to the carrier,
delivery), «доставлен» (delivered,ready), «отменён в ILFF» (cancelled in ILFF,canceled), «возврат» (return); - Оплата при получении (Cash on delivery): payment method ids separated by commas; empty means the methods of payment to the courier;
- Остатки из ILFF (Stock from ILFF), Вес товаров из ILFF (Product weight from ILFF), Вес и габариты собранного заказа (Weight and dimensions of the picked order):
1or0.
The Вид доставки ILFF (ILFF delivery kind) field of each method: door is courier, pickup is a pickup point, post is Russian Post.
Step 4. What the shopper sees
At the «Доставка» step (after the address) the ILFF methods are shown with the price, and under them the carrier or the point and the delivery time. Before a point is chosen, «Пункт выдачи ILFF» shows «выберите пункт выдачи, от N ₽» (choose a pickup point, from N ₽) and the list of points of the city; the step is not completed without a chosen point. A method that does not deliver to the shopper's address is not shown.
Place a test order, move it to the status «Принят» (Accepted) and make sure the order has arrived in ILFF.
Step 5. Linking products
Once a day the module sends the catalogue products to ILFF. The link in the ILFF client account (Товары магазина, Store products) is matched by the Артикул field of the product: fill it in for the products stored at the ILFF warehouse.
| 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 «Артикул» field in the store |
The order in the store
The module adds the ILFF request number, the tracking number and exchange errors to the Служебная информация (Service information) of the order, which is visible in the admin panel. The order status changes by ILFF statuses according to the settings, and stock is written to the «Общее количество на складах» (Total quantity in warehouses) field of the product.
Order cancellation
Moving an order to a cancellation status cancels the request in ILFF until it has been handed over to the carrier. If the request is already with a carrier that accepts cancellation (Dalli, 5Post), the cancellation is passed to it; otherwise the reply of ILFF appears in the service information: contact your manager.
The exchange task
The task must be run every 5–15 minutes: at the address https://your-site/ilff_cron.php?token=<token> (the installer prints the address with the token) or with the command php ilff_cron.php in the site root from the server cron. Do not publish the address.
If something does not work
| Symptom | Cause and solution |
|---|---|
| ILFF methods are missing at the «Доставка» step | The API key is not entered, the address has no city, or the template of the delivery step does not output the ILFF method (step 2, item 4) |
| «Выберите пункт выдачи ILFF» (choose an ILFF pickup point) | Choose a point in the list under the «Пункт выдачи ILFF» method |
| An order did not arrive in ILFF | Check the order status and the «Передавать в ILFF в статусах» setting, the service information of the order and the "waiting for linking" banner in the account |
| The tracking number and status do not arrive | The exchange task is not set up |
The module writes exchange errors to sys-temp/logs/ilff.log, without the API key and shopper data. For other questions contact your ILFF manager.