Supplier Feed Import & Dropshipping for PrestaShop 8 & 9
Install, configure and automate multi-supplier import (CSV, XML, JSON), margins and stock synchronization.
Overview
The Supplier Feed Import & Dropshipping module (technical name dfsupplierfeed) automatically imports and syncs your suppliers’ catalogs into PrestaShop 8 and 9. It handles multiple suppliers and multiple feeds in CSV, XML and JSON, applies your margin rules to compute retail prices from the purchase cost, syncs stock every hour via cron, and arbitrates duplicate EAN13 codes between sources through a per-supplier priority.
The module does not replace PrestaShop’s native CSV import (built for a single manual load): it industrializes recurring imports from several sources, with automatic margins and stock synchronization.
Installation
- In the back office, go to Modules > Module Manager, then Upload a module.
- Select the
dfsupplierfeed.zipfile and confirm. - Once installed, click Configure.
On install, the module creates five tables (dfsf_supplier, dfsf_feed, dfsf_rule, dfsf_product, dfsf_log) and generates a unique cron token.
Interface overview
The configuration page is organized in tabs:
- Dashboard — counters (suppliers, feeds, linked products, rules) and a how-it-works reminder.
- Suppliers — create suppliers and set their priority.
- Feeds — define feeds and their mapping.
- Margin rules — retail price computation rules.
- Logs — import history.
- Settings & Cron — general settings and ready-to-copy cron URLs.
Step 1 — Create your suppliers
In the Suppliers tab, add a supplier with:
- Name — the supplier label.
- Priority — an integer,
1being the highest priority. It is used to settle EAN13 duplicates (see below). - Active — an inactive supplier is skipped by the cron.
- Create the native PrestaShop supplier — recommended: links a standard PrestaShop supplier, which also fills the purchase cost in
product_supplier.
Assign the best priorities (lowest numbers) to your most reliable or cheapest suppliers: they are the ones that will “own” shared products.
Step 2 — Configure a feed
In the Feeds tab, each feed is attached to a supplier and includes:
- Source type — remote URL or local file (path relative to the shop root, restricted to that directory for security).
- Source — the URL or file path. Gzip-compressed responses are decoded automatically.
- Format — CSV, XML or JSON.
- Prices incl. tax? and Tax rate — if the feed provides tax-inclusive costs, the module converts them to tax-excluded using this rate.
- Default category — category for products created without an explicit category.
- Create missing products, Import images, Include in hourly stock sync, Active.
Field mapping
The mapping is a JSON object linking your feed’s columns/nodes to normalized product fields. The 13 canonical fields are: name, reference, ean13, cost, quantity, description, description_short, category, manufacturer, weight, tax_rate, image, mpn.
CSV mapping
Link each field to a column header (or a 0-based column index). The delimiter is auto-detected (;, ,, tab or |) and decimal commas are accepted.
{
"fields": {
"name": "product_name",
"reference": "sku",
"ean13": "ean",
"cost": "price",
"quantity": "stock",
"image": "image_url"
}
}
XML mapping
Set items_path, the path to the repeated item nodes (e.g. products/product), then map each field to a relative path. An @ prefix reads an attribute, and sub-elements are separated by slashes.
{
"items_path": "products/product",
"fields": {
"reference": "@sku",
"name": "title",
"ean13": "ean",
"cost": "pricing/wholesale",
"quantity": "stock/quantity"
}
}
JSON mapping
Set items_path, the path to the items array in dot notation (e.g. data.products), then map each field. Array indexes are written as numeric segments (e.g. images.0).
{
"items_path": "data.products",
"fields": {
"reference": "sku",
"name": "name",
"ean13": "barcode",
"cost": "prices.cost",
"quantity": "inventory.available",
"image": "images.0"
}
}
A row is skipped if it has neither an EAN13 nor a supplier reference: those are the two matching keys. EANs are validated then normalized to 13 digits.
Step 3 — Define your margins
In the Margin rules tab, each rule computes the tax-excluded retail price from the tax-excluded purchase cost:
- Percent —
cost × (1 + value/100). E.g. value 35 → +35%. - Coefficient —
cost × value. E.g. value 1.8 → ×1.8. - Fixed addition —
cost + value.
An optional psychological rounding is then applied: x.99, x.95, x.90 or round up to integer.
Scope and rule resolution
A rule can target a supplier, a category, both, or be global. When a product matches several rules, the most specific one wins, in this order:
- supplier + category
- supplier only
- category only
- global rule
Category rules also apply to child categories: a rule on the product’s exact category beats a rule on a parent category. If no rule matches, the default margin (Settings tab) is used.
EAN priority between sources
This is the core of the module in a multi-supplier setup. When the same ean13 appears in several feeds:
- The supplier with the best priority (lowest number) owns the product; prices, stock and cost come from its feed.
- Other sources are skipped for that reference (“skipped” status in the logs).
- If a better-priority supplier later brings that EAN, it automatically takes over ownership of the product.
You decide who’s authoritative by tuning priorities: sourcing the same reference from several wholesalers becomes safe, without feeds contradicting each other.
Running an import manually
In the Feeds tab, each feed has two buttons:
- Full import (play icon) — updates linked products and creates missing ones (if the feed allows it).
- Stock sync (refresh icon) — updates only prices and quantities of already-linked products.
Automating with cron
The Settings & Cron tab shows two ready-to-copy, token-protected URLs. Set them up in your server’s task scheduler:
# Hourly stock sync (prices + quantities of linked products)
0 * * * * curl -s "https://yourshop.tld/index.php?fc=module&module=dfsupplierfeed&controller=cron&token=YOUR_TOKEN&mode=stock" > /dev/null
# Nightly full import (creations + updates)
30 3 * * * curl -s "https://yourshop.tld/index.php?fc=module&module=dfsupplierfeed&controller=cron&token=YOUR_TOKEN&mode=full" > /dev/null
Add &id_feed=N to process a single feed. The endpoint returns a JSON report (created, updated, skipped, errors per feed).
If you regenerate the token in settings, remember to update your cron jobs: the old URL will return a 403 error.
General settings
- New products active immediately — disabled by default: products created by feeds are drafts so you can review them before publishing.
- Default margin — applied when no rule matches.
- Log retention — number of days before automatic purge.
- Regenerate the cron token.
Monitoring and logs
The Logs tab lists every run with the feed involved, the mode, the counters (created / updated / skipped / errors), the execution time and the details of the first errors encountered. Logs are purged automatically according to the configured retention.
Troubleshooting
“Feed file not found or outside shop directory”
For a file source, the path must point to a readable file located inside the shop directory. Use a path relative to the root, or a URL.
Products are created but invisible on the front office
This is the default behavior: created products are disabled. Review then enable them, or turn on “New products active immediately” in settings.
A supplier never overwrites a shared product
Its priority is probably worse (higher number) than the owning supplier’s. Adjust priorities in the Suppliers tab.
Prices look too high/low
Check whether the feed provides tax-inclusive costs (“Prices incl. tax?” option + tax rate) and verify which margin rule actually applies through the resolution order.
Compatibility
- PrestaShop 8.0 to 9.x, PHP 7.4 to 8.3.
- No PrestaShop core override.
- Module translated into FR, EN, ES, DE, IT.