This guide is for "hybrid" merchants, who use the old platform and the new Lengow platform together.
The plugin is compatible from version 188.8.131.52 until version 1.6.
Note: the plugin is not compatible with PrestaShop versions 1.5.2 until 1.5.4.*. If you have one of these versions:
- update your PrestaShop plugin (recommended).
- enable the feature "Limit to one order per import".
Contact our Support Team to download the plugin.
1. Plugin install
1.1 Plugin install in PrestaShop
Before you install/update the plugin, follow our advice!
After downloading the plugin, go to PrestaShop:
- “Modules" tab
- Click on “Add a new module”
- Select the downloaded archive and confirm
- Click on "Install"
1.2 Update the plugin version
Update process is the same as plugin installation process.
The plugin versions evolve regularly. Contact our Support team before any update to make sure the version and you settings are compatible with the platform.
2. Plugin configuration in PrestaShop
How to access it?
Click on "Configure" to access plugin configuration.
This plugin is compatible with both Lengow versions. Please enable the platform(s) on which you have access, then enter your credentials for each platform.
- Customer ID: enter your client ID, as provided by your Lengow account manager. You can also find it in the Lengow solution > "See your account details" tab > id XXXX
- Group ID: enter your group or your Lengow groups IDs. You can find it in the Lengow solution > "See your account details" > "Group management". If you enter several group IDs, separate them with commas (example: 11095,11099)
- Token API: enter your API Token. To find it, go to the Lengow solution > API/WebServices (at the bottom of the page) > "Authentification" > “Token API” (1) (https://solution.lengow.com/api/)
- Account ID: enter your account ID. You can find it by clicking on your avatar on the top right corner of the page > "Company settings" > You can see on the top left of the page: "Account ID: XXXX")
- Access token: enter your access token. You can find it by clicking on your avatar on the top right corner of the page > "Company settings" > "Orders" > "Centralise orders" tab > "Access Token".
- Secret: enter your password. You can find it by clicking on your avatar on the top right corner of the page > "Company settings" > "Orders" > "Centralise orders" tab > "Secret".
- Authorised IP
You can add specific IP addresses for them to access your export (= your products catalogue URL):
To track your orders in Lengow, enable the tracking:
Tracker type choice: select a tracker to enable it.
Product ID for tag: select product ID you send to channels through Lengow.
3. Set up your products catalogue export
Lengow can retrieve your products catalogue in different formats (csv, xml, json and yaml) thanks to the export script. It is then uploaded in your Lengow account when you add a products catalogue and can be used for channel setup Lengow.
3.1 Products selection
You can select specific products to export in your catalogue. Click on "Catalog", then on "Lengow".
1. Multiple selection
If you wish to publish or unpublish several products at once, tick the concerned products, then in "Grouped Actions", click on "Post on Lengow / Remove from Lengow".
2. Selecting product by product
To publish/unpublish a specific product from the selection, click on the "Lengow status" icon near the concerned product. Page will automatically refresh with the updated status.
3.2 Export settings
Configure your export settings to export your catalogue:
- Default export carrier
Assign here a carrier to calculate your shipping fees. The suggested list is based on carriers which were set up in your PrestaShop back office.
- Export only selection:
Exports the Lengow products selection only. When disabled, your whole catalogue will be exported.
- Export disabled products:
Exports all your products, whichever their status in PrestaShop (active or inactive).
- Auto export of new product(s):
Automatically adds new products to your export catalogue.
- Export product variations:
Exports parent products and their variations. This feature can be handy if you send your catalogue to marketplaces and Google Shopping.
- Titles + attributes + features:
If you enable this feature, your variations titles will be displayed as follows: Title + attributes + features. For instance, a "Short-sleeved T-shirt" will be displayed as "Short-sleeved T-shirt - Colour: Blue - Size: S". When disabled, product name will be "Short-sleeved T-shirt".
Note: an attribute is used to define variations. It can also influence product price and can be selected. A feature is a technical information on a product.
- Export out of stock products:
Exports your out of stock products. Enable it if you sell on marketplaces, as most marketplaces request that you send a 0 quantity for out of stock products to correctly unpublish them.
- Image type to export:
Choose image size you wish to export.
- Number of images to export:
Choose number of images you wish to export.
- Export default format:
Choose format to export (xml, json, csv and yaml). It is recommended to use csv on Lengow.
- Export in a file:
Enable this feature if your catalogue contains many products (more than 3,000) or when your catalogue takes a long time to be generated. Your catalogue will be saved in a file/export of your Lengow plugin. Lengow will then retrieve this file to index your catalogue.
Note: if you use a file, add a CRON task to keep your file updated.
- Export fields:
Choose the fields you want to export in the displayed list. Maintain the "control" or "command" key to select several fields.
- Export products features:
When the "Export product variations" feature is disabled, products features (as defined in PrestaShop) are not exported. If you enable this option, features will be exported in separate fields.
- Export script:
You will find here the URL to launch your export script. It will appear under the following structure: www.your-shop-prestashop.com/modules/lengow/webservice/export.php.
This URL will be used as a products catalogue URL on Lengow.
3.3 Export setting overwriting
You can add settings (GET) to export and import URLs so as to overwrite the plugin settings:
- format: export format (csv, json, xml, yaml)
- mode: exports all products and variations (full) or without variations (simple)
- stream: stream (1) or file writing (0)
- shop: shop ID if several shops
- cur: currency (ISO format)
- lang: language (ISO format)
- ids: exports specified products only (IDs separated with commas)
- active: “enabled” for active products, “all” for all products
- limit: limits export to a certain number of products
- out_stock: exports out of stock products (1)
For instance: www.your-shop-prestashop.com/modules/lengow/webservice/export.php?format=csv&limit=15&out_stock=1
4. Set up channels orders import
Orders import consists in creating marketplaces orders in your PrestaShop back office. You can therefore manage and process your orders directly in PrestaShop. Before launching an import, it is important to configure the following settings.
Although there are default options (defined by popularity), you can change them to suit your needs.
4.1 Status Management
You can match marketplaces orders statuses with PrestaShop statuses. Matching can be done through the following options:
- Status of process orders
- Status of shipped orders
- Status of cancelled orders
It is important to complete this matching so that the plugin automatically updates orders on marketplaces and on Lengow.
4.2 Orders logistics
- Payment methods:
Customs payment method display. When an order is imported, there is no need to create a new payment, since the order has been already paid on the marketplace. The Lengow plugin therefore implements a fictitious payment to display the payment name "Lengow" or the marketplace name (from which the order comes from).
- Default carrier:
Assign a default carrier. The suggested list is based on the carriers which have been set up in your PrestaShop back office.
4.3 Other import setting
- Imported from X days:
Define the period on which you want to import orders. If you want import orders which have been placed over the past 5 days, simply enter the value "5". Orders which were already imported are saved in your database (so that orders are not saved several times).
- Force prices:
Imports orders along with prices displayed on the marketplaces. If the price in your PrestaShop is not the same as on the marketplace, the marketplace price will be considered.
- Force products:
Thanks to this feature, you can force orders import even when products are out of stock or inactive. In case a product of an order is not available and this feature is not enabled, the concerned order will not be created.
- Import processing fee:
When this feature is enabled, marketplaces fees (commissions) are included in the order. This simplifies your accounting processes.
- Fictitious e-mail:
When this feature is enabled, customers created during order import will all have a fictitious e-mail address, based on order number. Thanks to this feature, a customer who placed an order on the marketplace does not already have a PrestaShop account. Otherwise, if this same customer would place another order on your PrestaShop website, s/he will have an error message indicating s/he has an existing account.
- Marketplace shipping method:
Retrieves the carrier selected by the customer on the marketplace. If the carrier is not available in your PrestaShop, the most popular carrier will be selected.
- Report e-mail:
Choose to receive a report e-mail for each import, which informs you whether there were errors during orders import.
- Send reports to:
Provide here the e-mail addresse(s) to which you want to send import reports - you have to enable the "Report e-mail" feature beforehand. If you wish to enter several e-mail addresses, separate them with commas and without any space. If you do not provide any e-mail address here, your PrestaShop e-mail address will be considered.
Limits order creation per launched import. It is meant to tackle the incompatibility issues for PrestaShop versions (from 1.5.2 until 1.5.4). It also prevents orders from being created twice.
- Import state and script:
Informs whether an import is in progress.
Import script corresponds to the displayed URL. If you go to this URL, order import will start. The URL is structured as follows: www.your-shop-prestashop.com/modules/lengow/webservice/import.php
4.4 Import settings overwriting
You may add settings (GET) to export and import URLs to overwrite the plugin configuration:
- limit: limits order number to export
- days: changes period on which you wish to import orders
- shop: shop ID (if there are several shops)
- lengow_debug: imports orders in debug mode
For example: www.your-shop-prestashop.com/modules/lengow/webservice/import.php?limit=15&days=5
In the last Lengow plugin versions for PrestaShop (from version 2.0.7), you can import a specific order. Provide the import URL feed ID and the order ID in GET settings (idOrder). For example: www.your-shop-prestashop.com/modules/lengow/webservice/import.php?idFlux=1234&idOrder=12346ABC
4.5 Orders logs
Logs indicate whether orders imports were performed without any error. The plugin integrates an interface informing when an order has been correctly imported or when an error has occurred. Click on "Catalog" > "Logs import Lengow". You may search per order (depending on the marketplace ID) to read the related message.
For orders which were in error and which errors have been corrected, delete the message for the order to be imported again, as import is not automatically re-launched on orders which registered a log. This helps saving time on all imports.
5. Other settings
The last elements address developers:
- Debug mode: use it to carry out some tests with the Lengow plugin. When enabled, it imports orders under a fictitious Lengow order ID. Thus, actions carried out on imported orders will not be impacting in the Lengow platform. Note: when enabled, orders may be imported several times. Use this feature for testing purposes only.
- Export timeout: use this option to export into a file. It divides export products catalogue generation into several cycles which duration is defined by the value you provide in the field. You can therefore avoid timeout errors.
- Logs: all plugin actions are saved in the listed files. Log files lifetime is 5 days.
CRON is a tool which automatically executes some tasks. Since its version 1.6, PrestaShop has integrated a CRON tasks manager in its plugins. Here is how to set up CRON tasks:
1. Set up a CRON task with PrestaShop tasks manager
Go to the CRON tasks manager to add a new CRON task.
Then click on the '+' icon to add a new task.
You land on a page on which you can create a CRON task. Fill in the following fields:
- Task description: provide your task name. For example: "Cron Export Lengow".
- Target Link: provide your script URL. If you want to automate export (to export a file), paste your script export URL as provided in the plugin. The export URL should be as follows: http://your-shop-prestashop.com/modules/lengow/webservice/export.php.
If you want to automate orders import, then provide import URL. The import URL should be as follows: http://your-shop-prestashop.com/modules/lengow/webservice/import.php.
- Task frequency: task execution frequency.
PrestaShop only allows you to choose every hour as a regular frequency. As far as CRON import is concerned, it is actually recommended to leave at least 15 minutes between each CRON task. As for CRON export, Lengow indexes products every 4 hours. For both tasks, frequency is set every hour, every day of the month.
Save your settings.
2. Set up a CRON task on your server
Setting up a CRON task on your server must be done by a technician or a developer. Setting up a CRON task on your server:
- allows you to choose task execution frequency
- creates several export files according to selected settings: when you save your export in a file, it is overwritten by default. This comes out detrimental if you wish to have several products catalogues with different settings (see below). Using a server CRON task prevents the overwriting issue thanks to a wget command. When adding the -O setting to the command, you can save your products catalogue in the file of your choice. For example:
* 0 0 */4 * * wget http://mywebsite.web/modules/lengow/webservice/export.php