Exporting
Get a CSV out of Craft Commerce so you can edit it in a spreadsheet and reimport. Audience: anyone maintaining product data.
Two ways to export
- One product at a time: from the product edit page. Useful when you want to edit a single product’s variants.
- Many products at once: from the Variants element index, using a multi-select action. Useful for catalog-wide updates.
Exporting one product
-
Commerce -> Products and open the product you want to export.
-
In the right-hand sidebar at the bottom of the edit page, click Export Product.

-
The file downloads automatically as
{id}__{slug}.csv(for example42__classic-tee.csv).
That filename is important: when you reupload it, Variant Manager uses the {id} part before __ to match the file back to the same product even if you have renamed the product since exporting. Do not rename the file before reuploading.
Exporting many products
- Variant Manager -> Variants, which is the plugin’s variants element index.
- Filter or search to narrow down the variants you want.
- Select the variants you want to export. Use the checkbox in the table header to select everything visible.
- Open the actions menu and choose Export Variant Data.
Variant Manager finds the products that own those variants and exports one CSV per product:
- One product: a single CSV downloads, named the same way as the single-product export.
- Multiple products: a zip downloads, named
products_{YmdHis}.zip(for exampleproducts_20260513142301.zip). Each CSV inside is named{id}__{slug}.csv.
You can also trigger this action from the standard Commerce -> Products -> Variants element index, since the plugin registers itself on the same element type.
What is in the exported CSV
Exported CSVs are shaped so they can be reimported as-is after edits to cell values.
Column order:
- Product fields from
productFieldMap(title, slug, status, plus anything custom). - Variant fields from
variantFieldMap(sku, height, width, length, weight, and so on). - Per-site Commerce variant fields suffixed with
[siteHandle](basePrice[default],inventoryTracked[default],availableForPurchase[default],freeShipping[default],promotable[default],minQty[default],maxQty[default]), one column per site in the store. - Inventory columns for each inventory location, all six totals per location (
Inventory[location]: available,committed,reserved,damaged,safety,qualityControl). - Variant Attribute columns prefixed with
Attribute:(one per attribute on the product).
A few notes on the export content:
- The first row after the header is the product row. It carries the product’s title, slug, status, and any product field values.
- Each following row is one variant.
- Disabled products and variants are included; the
statuscolumn readsdisabledfor them. Removing thestatusentry fromproductFieldMapskips the column. - Variants with
inventoryTrackedon get their inventory totals filled in; untracked variants have empty cells in the inventory columns. - The
stockcolumn, if you have it mapped, is left empty for tracked variants since Commerce’s inventory levels manage stock instead.
See configuration reference for changing the field maps.
Editing and reimporting
Steps:
- Export the product or products.
- Open the CSV in your spreadsheet app.
- Edit values. Add new variant rows for new variants; delete rows for variants you want removed.
- Save the file. Keep the original filename (
{id}__{slug}.csv). - Upload from Variant Manager -> Dashboard -> Upload Product.
When you reupload an existing product:
- The modal will recognise it as an existing product and ask whether to Update and remove extra variants (default) or Replace all variants.
- Choose Update and remove extra variants for the round-trip workflow. Any variant whose SKU is in the CSV gets updated; any variant whose SKU is missing gets deleted.
See importing for the difference between the two refresh options.
Common gotchas
- Renaming an export file: do not. Renaming
42__classic-tee.csvto anything else makes Variant Manager treat it as a brand-new product and will probably fail with “One or more SKUs already exist”. - Editing column headers: do not rename the column headers. The plugin maps columns by header text; changing
basePrice[default]toPricewill leave prices unchanged on reimport. - Reordering columns: safe. The plugin matches columns by header, not position.
- Adding new attribute columns: safe. Add a new
Attribute: Materialcolumn with values and reimport. - Removing attribute columns: removes that attribute from every variant.
- Adding a row with a new SKU: creates a new variant on reimport.
- Removing a row: deletes that variant on reimport (under the default Refresh variants choice).