Modules for online stores

Connecting a PrestaShop store to ILFF

See also: Delivery widget for the cart · ILFF API · All CMS modules

Download the module ilff-prestashop.zip

The module «ILFF: доставка и фулфилмент» (ILFF: delivery and fulfilment) links your PrestaShop store with the ILFF service:

  • ILFF carriers appear at the "Shipping method" step: courier to the door, a pickup point chosen on a map and Russian Post, with the price and delivery time;
  • an order with an ILFF carrier 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 module itself calls the ILFF service with the API key, and you do not need to open the store to us.

You need:

  • PrestaShop 8 or 9 (tested on 8.2.9);
  • PHP with the curl extension;
  • the store currency is the Russian rouble, the weight unit is kg and the dimension unit is cm: ILFF calculates delivery and order amounts in roubles;
  • the standard PrestaShop checkout (the classic theme or a theme built on its markup);
  • store administrator rights, access to the server cron or the hosting scheduler and to the ILFF client account.

The connection takes 15–20 minutes.

The module 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. PrestaShop menus are named in English.

Step 1. Connection in the ILFF client account

Client account → the Интеграции (Integrations) tab → expand the Интернет-магазин (Online store) block.

  1. Платформа (Platform): choose PrestaShop.
  2. Адрес магазина (Store address): the site address, for example shop.ru.
  3. 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). We recommend leaving the checkbox on.
  4. Press Подключить (Connect). The account creates the connection. It does not call the store 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 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 module

  1. Download the module archive from the module page on the ILFF site or get it from your manager. Do not unpack the archive.
  2. In the PrestaShop admin panel open Modules → Module Manager, press Upload a module and choose the archive.
  3. After installation press Configure.

During installation the module itself:

  • creates the tables for the order queue and the chosen points;
  • creates the carriers Курьер ILFF (ILFF courier), Пункт выдачи ILFF (ILFF pickup point), Почта России (ILFF) (Russian Post) for all zones and customer groups;
  • adds the ILFF settings page (Modules → Module Manager → ILFF → Configure).

Step 3. Module settings

Связь с ILFF (Connection to ILFF)

  1. Ключ API ILFF (ILFF API key): the key from step 1. The saved key is not shown: to change the other settings only, leave the field empty.
  2. Адрес сервиса ILFF (ILFF service address): already filled in, no need to change it.
  3. Код клиента для виджета (Client code for the widget): the code from the client account. Without the code the choice of a point on the map does not work and the «Пункт выдачи ILFF» carrier is not offered.
  4. Вариант настроек калькулятора (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: when the goods total reaches the threshold, delivery is shown as «Бесплатно» (Free).
  5. Адрес подсказки городов (City suggestion address): optional.

Заказы (Orders)

  1. Статусы отправки заказа в ILFF (Statuses that send the order to ILFF): by default "Payment accepted" and "Processing in progress". The order goes when it moves to one of these statuses. An order paid on delivery starts with the status "Awaiting Cash On Delivery validation": move it to "Processing in progress" once you have checked it.
  2. Статусы отмены (Cancellation statuses): "Canceled" by default. Moving a sent order to such a status cancels the request in ILFF.
  3. Оплата при получении (Cash on delivery): the payment modules with which the shopper pays on receipt (ps_cashondelivery by default). Such orders go to ILFF with cash on delivery, the others are treated as prepaid.

Order statuses by ILFF statuses. «Не менять» (Do not change) leaves the status as it is:

SettingILFF statusesDefault
Статус «Передан в доставку» (handed over for delivery)Передан в КСShipped
Статус «Доставлен» (delivered)Доставлен клиенту, Выдан, Частичная выдачаDelivered
Статус «Отменён» (cancelled)Отменен, АннулированCanceled
Статус «Возврат» (return)Возврат принят, Полный отказНе менять

Emails to the shopper on a status change are sent by PrestaShop according to the status settings.

Остатки, вес и габариты (Stock, weight and dimensions)

  1. Получать остатки из ILFF (Receive stock from ILFF): free stock is written to the quantity of the product (or combination), 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.
  2. Получать вес и габариты товаров (Receive product weight and dimensions): the weight and size measured at the ILFF warehouse are written to the products (kg, cm), only where we have them filled in. Combinations are not changed: in PrestaShop their weight is an addition to the product weight.
  3. Получать вес и габариты заказа (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.

Press Сохранить и проверить связь (Save and check the connection): «Связь с ILFF есть» (connected to ILFF) appears. Then press Передать товары в ILFF (Send products to ILFF) in the Состояние обмена (Exchange state) block: the products go to ILFF for linking (step 5).

Step 4. Carriers and what the shopper sees

Shipping → Carriers: you can rename ILFF carriers and change their order, logo and transit time caption; do not set a price for them, ILFF calculates it. Switch off a carrier you do not need. Switch off the store carriers with a fixed price if ILFF does the delivery.

The shopper at the "Shipping method" step (after the address):

  1. Курьер ILFF: the price and under it the carrier and delivery time, for example «603 ₽, СДЭК (от 2 до 3 дней)». The price is calculated by the city of the address, the street goes to ILFF with the order.
  2. Пункт выдачи ILFF: before a point is chosen, «Выберите пункт на карте: от N ₽» (choose a point on the map, from N ₽) and a blue button Выбрать пункт на карте. Choosing this carrier also opens the map. After a point is chosen the step is refreshed: the address of the point under the carrier, the exact price and delivery time for the carrier, and the button Изменить пункт выдачи (change the pickup point).
  3. Почта России (ILFF): Russian Post to the shopper's address, if the ILFF service calculates Russian Post for your store.
  4. On the «Курьер» tab of the widget the shopper can choose a courier carrier: the «Курьер ILFF» carrier is selected with the price of that carrier.
  5. Without a chosen point the "Shipping method" step is not completed: «Выберите пункт выдачи» (choose a pickup point) appears. If the point is not calculated for another city of the address, the choice is reset.

If the shopper's city has no pickup points, the widget shows the nearest points of neighbouring cities with the distance; the price is calculated to the chosen point. A carrier that does not deliver to the address is not shown in the list.

Place a test order with an ILFF carrier, move it to the sending status and make sure the order has arrived in ILFF.

Step 5. Linking products

In the ILFF client account the Товары магазина (Store products) button in the "Интернет-магазин" block shows the store products sent by the module and their link to your products in ILFF. The link is matched first by barcode, then by SKU:

  • barcode: the EAN-13 field (or UPC, ISBN) of the product or combination;
  • SKU: the Reference field of the product or combination.
StatusWhat 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 reference in the store

A product with combinations (size, colour) is passed as combinations: each has its own reference and barcode, and stock and orders go by combination.

If an order is waiting for linking, a banner with the number of such orders appears at the top of the Интеграции tab. After linking, the module 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 tracking number is also written to the tracking number of the order carrier. The private messages of the order (visible to staff only) get the entries «ILFF: создана заявка …» (request created), «ILFF: трек-номер …» (tracking number), «ILFF: пункт выдачи …» (pickup point) and the reply to a cancellation.

Order cancellation

Moving an order to a cancellation status 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 messages show «ILFF: Заявка уже в работе…» (the request is already in work), contact your manager.

The exchange task

Add a task every 15–60 minutes: to the server cron as a command or to the hosting scheduler as an address. Both lines are in the Состояние обмена block on the settings page, for example:

*/15 * * * * php /var/www/shop/modules/ilff/cron.php

The task resends orders that did not go at once (after 1, 5, 15, 60 and 180 minutes), fetches tracking numbers and statuses, updates stock, weight and dimensions, and once a day sends the product list and reconciles all stock. Orders go to ILFF at once when the status changes, even without the task. The time of the last runs is shown in the Состояние обмена block; the Выполнить обмен сейчас (Run the exchange now) button is there too.

Updating and removing

Updating: upload the new archive the same way as on installation (Upload a module). PrestaShop updates the files, and the settings and data are kept.

Removing (Module Manager → ILFF → Uninstall): the ILFF carriers are deleted, the settings and the queue are erased, and the ILFF data in the orders stays.

If something does not work

Message or symptomCause 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 не подключён магазин» (the store is not connected in the ILFF client account)Step 1 is not done: choose the PrestaShop platform and press «Подключить»
«Нет связи с ILFF: Сервис ILFF не ответил» (the ILFF service did not respond)The store server cannot reach ILFF: check outgoing HTTPS connections to port 8443 and the curl extension
ILFF carriers are missing at the shipping stepThe address is not in Russia, the address has no city, or the carriers are switched off (Shipping → Carriers)
No «Пункт выдачи ILFF»The client code for the widget is not entered (step 3)
The map opens but the points do not loadThe store domain is not added to the widget domain list in the ILFF client account
No «Выбрать пункт на карте» buttonThe checkout theme does not output the extra carrier block (displayCarrierExtraContent): tell your manager
An order did not arrive in ILFFCheck 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 tracking number and status do not arriveThe exchange task is not set up: see the time of the last runs in the «Состояние обмена» block
Stock in the store differs from stock in the accountThe store receives free stock: without the reserve, unsent orders and goods in receiving

The module writes exchange errors to the PrestaShop log (Advanced Parameters → Logs, lines with [ILFF]), without the API key and shopper data. For other questions contact your ILFF manager.

WeChat

WeChat QR code

Scan the QR code in WeChat · 用微信扫码添加

We will call you back

During working hours we call right away, otherwise the next morning. Mon–Fri, 11:00 to 20:00 Moscow time. Managers speak Russian.