Modules for online stores

Connecting an OpenCart store to ILFF

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

Download the module ilff.ocmod.zip

The ILFF extension links your OpenCart store with the ILFF service:

  • ILFF delivery methods appear in the checkout: to the door and to a pickup point, with the price and delivery time;
  • 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 extension itself calls the ILFF service with the API key, and you do not need to open the store to us.

You need OpenCart 4.0.2 or newer, PHP 8 with the curl extension, store administrator rights, server access to set up cron and access to the ILFF client account. The connection takes 15–20 minutes.

The ILFF client account is in Russian, so its labels are given below as they appear on the screen, with a translation in brackets. The extension has English and Russian language files; the setting names below are given as in the English version.

Step 1. Connection in the ILFF client account

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

  1. Платформа (Platform): choose OpenCart.
  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 extension 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.

Step 2. Installing the extension

  1. Download the archive ilff.ocmod.zip from the module page on the ILFF site or get it from your manager. Do not rename the archive: OpenCart determines the extension code from its name.
  2. In the admin panel open Extensions → Installer and upload the archive, then press Install in the ILFF row.
  3. Open Extensions → Extensions, choose the type Shipping, find ILFF: delivery and order exchange and press Install (the green button), then Edit (the pencil).

During installation the extension itself:

  • creates the order queue tables;
  • connects the event handlers: remembering the order rate, sending and cancelling the order by status, the pickup point window on the checkout page;
  • creates the ILFF task (orders, tracking, statuses, stock) in the built-in OpenCart cron (Extensions → Cron Jobs), once an hour.

Step 3. Extension settings

  1. ILFF service URL: already filled in, no need to change it.
  2. 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.
  3. Order status that sends the order to ILFF: for example Processing. 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.
  4. Cancel statuses: tick the statuses in which the order is cancelled, usually Canceled. Moving to such a status cancels the request in ILFF.
  5. Store statuses for ILFF statuses. The "Do not change" value leaves the order status as it is:
SettingILFF statuses
Store status: handed to carrierПередан в КС (handed over to the carrier)
Store status: deliveredДоставлен клиенту, Выдан, Частичная выдача (delivered, handed out, partially handed out)
Store status: cancelledОтменен, Аннулирован (cancelled, voided)
Store status: returnedВозврат принят, Полный отказ (return accepted, full refusal)

On the first installation the extension sets the statuses itself: the order goes to ILFF in the Processing status, and by ILFF statuses it sets Shipped (handed over for delivery), Complete (delivered), Canceled (cancelled) and Refunded (return). You can change them.

  1. Cash on delivery payment codes: separated by commas. The default is cod (the standard Cash On Delivery method). Only these methods will have cash on delivery in the request, the other orders are treated as prepaid.
  2. Receive stock from ILFF: free stock is written to the product quantity, 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.
  3. Receive product weight and dimensions: the weight (kg) and size (cm) of products from ILFF are written to the products, only where we have them filled in.
  4. Simplified Russian address (on by default): the checkout hides the country (always Russia), the region, "Company" and "Address 2". The "City" field goes before the street and suggests cities, and the region and postcode are filled in from the chosen city. Only the postcode remains in the cart shipping estimate.
  5. Delivery on the product page (off by default): the "from" price of courier delivery and delivery to a pickup point for the shopper's city is shown under the "Add to Cart" button.
  6. Pickup point window: "ILFF widget" (the default: map, carriers and prices) or "Simple window". For the widget, enter the ILFF client code for the widget from the client account and add the store domain to the widget domain list in the account. Without the code the simple window opens. Delivery calculator settings variant 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.
  7. City suggestions URL: optional. Empty means the suggestion is taken from the ILFF service next to the service address.
  8. Geo Zone: if ILFF delivery is not needed everywhere, choose a geo zone. Status: enable it. Sort Order: the position of the method among the others.
  9. Tick Send the product list now and press Save and check connection. At the top you will see that the connection to ILFF works, with the client name, the number of products sent and, if stock is on, the number of stock values updated.

Step 4. Checkout

  1. The calculation needs a delivery address: the city and the street with the house number. With the simplified Russian address the country and region are filled in on their own. In the cart shipping estimate the city is taken from the postcode; if it cannot be determined, "we will calculate at checkout" is shown instead of the price.
  2. ILFF door delivery is shown with the price and delivery time of the cheapest rate.
  3. ILFF pickup point: a button for choosing an ILFF pickup point appears under the delivery method button. It opens the list and the map of the city's points. After a point is chosen, the delivery methods are refreshed and show "ILFF pickup point: address" with the price and delivery time.
  4. Switch off the store delivery methods with a fixed price if ILFF does the delivery.
  5. Place a test order with ILFF delivery, 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 extension and their link to your products in ILFF. The link is matched first by barcode (the EAN field, or UPC if it is empty), then by SKU (the SKU field, or the model if it is empty).

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 EAN or SKU in the store

Sizes and colours can be kept in two ways:

  • OpenCart 4 variants (recommended). Each size or colour is a separate product variant with its own EAN and SKU. The link is matched by barcode on its own, and stock and orders go by variant.
  • Product options. One product with a list of values (for example, "Size: S, M, L"). An option value has no barcode of its own, so in «Товары магазина» each value is shown as a separate row "Product / Option: value", and you need to link it to your product manually once. After that the ILFF stock is written to the quantity of the option value, and an order with this value arrives in ILFF with the right product. An unlinked option value is not replaced by the main product: such an order waits for linking.

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 extension resends the order itself.

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. If the street is not in the address directory (villages, new streets), the courier price is calculated by city.

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 history gets the entry «ILFF: Заявка уже в работе…» (the request is already in work), contact your manager.

Step 6. Cron

The ILFF task is run by the built-in OpenCart cron 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 as a comment to the order history, 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.

The built-in OpenCart cron is started by the system cron of the server. Add a server job that calls the OpenCart cron every 5–15 minutes (OpenCart shows the command on the Extensions → Cron Jobs page). Without it tracking numbers, statuses and stock will not be updated. Orders go to ILFF at once when the status changes, even without cron.

In OpenCart 4.1.0.4 running php cron.php from the command line can end with a core error ("Class Twig\Loader\FilesystemLoader not found"). In that case call cron through the store address, for example curl -s https://your-store/index.php?route=cron/cron.

Updating the extension

The OpenCart 4 installer does not install an archive over an already installed extension ("Extension already installed!" or "Path ilff/ already exists!"). So update like this:

  1. Download the new archive ilff.ocmod.zip from this page and unpack it on your computer.
  2. Copy the archive contents by FTP or through the hosting panel into the extension/ilff/ directory of the store over the old files. The extension settings are kept.
  3. If the new version has new events (for example, for the product page or the cart), open the extension settings and press Save and check connection: the missing events are added on their own.

Another way is to remove the extension in Extensions → Shipping and in the Installer and install the new archive again. The settings then have to be entered again.

If something does not work

Message or symptomCause and solution
No connection to ILFF: wrong API keyThe key was entered with an error or replaced. Copy the key from the client account and save the settings
No connection to ILFF: the OpenCart store is not connected in the ILFF client accountStep 1 is not done: choose the OpenCart platform and press «Подключить»
No connection to ILFF: the ILFF service did not respondThe store server cannot reach ILFF: check outgoing HTTPS connections to port 8443 and the curl extension in PHP
ILFF delivery methods are missing in the checkoutCheck the extension status, the geo zone and the delivery address: the city and region must be filled in
The address could not be parsedThe delivery address has no city or no street with a house number
No button for choosing an ILFF pickup pointCheck that the extension is installed and enabled and that the ilff_checkout event is enabled in Extensions → Events. If the checkout theme is custom, the button may not find its place: tell your manager
An order did not arrive in ILFFCheck the order status and the "Order status that sends the order to ILFF" setting, the order queue line in the settings and the "waiting for linking" block in the account. The order must have ILFF delivery
The tracking number and status do not arriveThe server cron is not set up (step 6): see the last run in the extension settings
Stock in the store differs from stock in the accountThe store receives free stock: without the reserve, unsent orders and goods in receiving
A simple window with a list opens instead of the widgetThe client code for the widget is not entered or the store domain is not added to the widget domain list in the client account
php cron.php: "Class Twig\Loader\FilesystemLoader not found"An OpenCart 4.1.0.4 core error when run from the command line. Call cron through the store address (step 6)

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.