Import Export CSV & XML for PrestaShop — Complete Guide
Install and configure CSV & XML import/export: profiles, visual mapping, FTP/SFTP/URL sources, cron, logs.
DF CSV & XML Pro is a universal import/export engine for PrestaShop 8 and 9. It connects any CSV or XML file to your store through visual column mapping, saves every configuration in a reusable profile, and can automatically fetch your supplier feeds from FTP, SFTP or a URL. This guide covers installation, profile creation, the expected column formats, cron scheduling, logs and troubleshooting.
Installation
Go to Modules > Module Manager > Upload a module, send the dfcsvpro.zip file and click Install. Once installed, a DF CSV Pro tab appears under Advanced Parameters.
The module adds no PrestaShop core override and uninstalls cleanly. Two tables are created (profiles and logs) along with a few configuration values; they are removed on uninstall.
Creating a profile
A profile describes a complete operation: direction (import or export), entity, format, source, column mapping, options and schedule. It relaunches in one click or triggers automatically via cron. Click New profile: a wizard guides you through four steps.
1. General
Choose the direction (import / export), the entity, the format (CSV or XML) and the target language. For CSV, set the delimiter (or leave auto-detection on), the encoding (UTF-8, ISO-8859-1 or Windows-1252), the number of lines to skip before the header, and the multi-value separator (comma by default). For XML, you can specify the item node or let the module detect it.
Entities available on import: products, combinations, categories, customers, stock & prices. On export: products, categories, customers, orders.
2. Source
Select where the file comes from (import) or where to deposit the result (export): manual upload, URL (HTTP/HTTPS), FTP, SFTP or local path. For FTP/SFTP, enter host, port, user and password, then use the Test connection button to validate before saving.
3. Visual mapping
Upload a sample file (or fetch it from the remote source): the module detects the columns, shows a preview of the first rows and automatically matches each column to the right PrestaShop field thanks to FR/EN recognition (reference/SKU, price, quantity/stock, EAN/barcode, VAT, etc.). Adjust the associations in the table; any column left on “not mapped” is simply ignored.
The match key (step 4) determines how an existing product is found: ID, reference/SKU, EAN-13 or MPN. Make sure the corresponding column is mapped.
4. Options & schedule
Define the import behaviour: create missing items, update existing ones, create categories on the fly, download images from URLs, replace or keep existing images on update, and the batch size (rows processed per AJAX call). Optionally enable scheduling and choose the frequency (hourly, daily or weekly). Save: the profile appears in the list, ready to run or schedule.
Column formats
The module understands PrestaShop’s business formats. Here are the conventions expected in your files:
| Field | Expected format |
|---|---|
| Price | Decimal, comma or dot: 19,90 or 19.90 |
| Booleans (active, etc.) | 1/0, yes/no, true/false |
| Categories | Names or IDs separated by the multi-value separator (default ,). Optional on-the-fly creation. |
| Images | URLs separated by the multi-value separator. The first one becomes the cover image. |
| Features | Name:Value|Name:Value |
| Combinations | Group:Value|Group:Value (e.g. Size:M|Color:Red) |
| VAT rate | Numeric value (e.g. 20), linked to the default country’s tax group |
Combinations
The attributes column follows the Group:Value|Group:Value format. Missing attribute groups and values are created automatically, and the combination is identified by its exact set of attributes — so re-running the import creates no duplicates. The parent product is found by its reference or ID depending on the match key.
Features
Use the Name:Value|Name:Value format. Each feature and its value are created if they don’t exist yet.
Categories, images and tags
These fields accept several values, separated by the multi-value separator defined in the profile. For categories, you can mix names and IDs; the first image listed serves as the cover.
Remote sources and security
On import, the module fetches the file from a URL (HTTP/HTTPS, with basic authentication if needed), an FTP server (passive or active mode), an SFTP server or a local path restricted to the store directory. On export, it can deposit the generated file on FTP/SFTP or in a local folder, or offer it for download.
SFTP requires the PHP ssh2 extension. If it is missing from your hosting, the interface says so clearly and you can use FTP or a URL instead.
FTP/SFTP passwords are encrypted at rest in the database (AES-256-CBC, key derived from your store’s encryption key) and are never sent back to the browser in clear text.
Batch import and resume
Manual imports run in successive AJAX batches, with a progress bar and real-time counters (OK / errors / total). After each batch, the exact position is stored: a file of tens of thousands of rows imports without causing a PHP timeout, even on shared hosting. In cron mode, processing chains synchronously to the last row.
Export
Create an export profile by choosing the entity (products, categories, customers, orders), the format (CSV or XML) and the fields to include. The generated file is offered for immediate download and/or deposited automatically on the configured remote destination. Exports are generated in batches to stay performant on large volumes.
Scheduling (cron)
To automate a profile, enable its schedule (step 4) then call the module’s cron URL at a regular interval. On each call, only the profiles whose frequency is due run.
*/15 * * * * curl -s "https://your-store.tld/index.php?fc=module&module=dfcsvpro&controller=cron&token=YOUR_TOKEN" > /dev/null
The exact URL and token are in the module’s Scheduling / Cron tab, with a button to regenerate the token. Two optional parameters:
&id_profile=N: runs only the specified profile.&force=1: ignores the frequency check and runs the profile immediately.
The store must be reachable for cron to work: maintenance mode blocks front controllers, including this endpoint.
Logs and e-mail alerts
Every run is logged with its status, its counters and row-by-row error detail (the first 200). The Logs tab lists the history and lets you review an import’s errors. As soon as an import fails or contains rows in error, an e-mail alert (FR or EN template) is sent automatically to the address configured in the settings.
Settings
In the Settings tab, enable or disable e-mail alerts, set the recipient address, the default batch size and the log retention period (older logs are purged automatically). Temporary import/export files are cleaned up after 48 hours.
XML format
On XML import, the repeated item node is detected automatically (or specified in the profile). Items are flattened: nested elements become parent/child columns, attributes become @attribute, and repeated elements are suffixed name#1, name#2. You then map these flattened columns as you would for a CSV.
Compatibility and technical notes
- Compatible with PrestaShop 8.0 to 9.x, PHP 7.4 to 8.3, multistore.
- CSV: automatic delimiter detection, BOM handling, ISO-8859-1 and Windows-1252 encoding conversion.
- Customers imported with a bcrypt-hashed password and assigned to a group by name.
- No core override; legacy AJAX uses the PS9 conventions.
Troubleshooting
The module interface stays empty or the dropdowns don’t populate. Clear the PrestaShop cache then force a browser reload (Ctrl+Shift+R). If a cache/CCC manager is active, regenerate the assets.
SFTP fails. Check that the PHP ssh2 extension is installed on the server; otherwise use FTP or a URL.
Cron doesn’t trigger. Check the token, that the store isn’t in maintenance mode, and that the profile has scheduling enabled and an automatic source (manual-upload profiles cannot be scheduled).
Some rows are in error. Open the log detail: each error shows the row number and the cause (missing key column, invalid value, etc.).