Products
Import products from CSV
Add or update products from CSV: three modes, the columns, the preview and how an export is read back in.
The import adds or updates products and variants from CSV.
Where: Products › ⋯ › Import CSV.
Modes
| Mode | What happens |
|---|---|
| Add new (default) | Each row becomes a new product. A slug that already exists stops the row. title and slug are required |
| Update existing | The row finds the product by slug and the variant by sku within the product. It writes only ticked columns, and only where the value differs. A row that matches nothing becomes NOT MATCHED. It creates nothing. Only slug is required |
| Add and update | Like Update existing, but it adds what does not match. A new slug becomes a new product and needs title. A new sku becomes a new variant |
The line under the mode picker says what matches. Every mode reports a row without a slug. The import never uses the title to find a product.
Columns
| Column | Contents |
|---|---|
title, slug, description | Basic details. A slug may only hold lowercase letters, digits and hyphens. description may be text or HTML, and HTML is cleaned as in the editor, see Formatting the description |
short_description | The text by the price on the product page, saved as plain text. HTML, such as WooCommerce's Short description, becomes text and the row shows short_description held HTML — saved as plain text. At most 600 characters, otherwise the row stops |
status | draft, active or archived. Empty becomes draft on a new product |
default_price, default_compare_at_price | Price and compare-at price in the base currency |
price_EUR, price_NOK … | Fixed price in another currency, one column per currency |
tax_category | standard, reduced, reduced_alt, super_reduced or zero |
weight_grams, length_cm, width_cm, height_cm | Weight and dimensions for shipping |
tags | Tags with | between them |
vendor | The vendor's name or slug, whatever the case. The import creates an unknown vendor once, and the preview says "(new vendor)". An empty cell with Empty cells clear the field removes the vendor |
source_id | The product's id in the old shop the catalogue came from, for example the WooCommerce product ID. Imported product id under Feeds sends it as g:id. At most 50 characters: letters, digits and . _ : / -, with a letter or digit first. An empty cell with Empty cells clear the field removes the id |
attr:Label | A free-form attribute, one column per label. An update finds the label whatever the case and keeps the stored spelling. The storefront's filters tell Handle and handle apart, so spell it the same on every product |
sku | Finds the variant within the product, whatever the case. Several rows with the same slug and different SKUs are the product's variants. The import reads the product's columns from the first row |
variant_title, variant_price, variant_compare_at_price | The variant's title, price and compare-at price. A new variant without a title gets its SKU as the title |
inventory_qty | The variant's stock. A new variant without stock in the file starts at 0 and shows as out of stock. The preview row says stock 0 — shows as out of stock until stock is set |
The import takes no images. It ignores other columns and lists them before it writes anything.
A source_id can be on only one product in the workspace. The row stops with source_id "…" is already on product … when another product has the id. It stops with source_id "…" already on line N of this file when an earlier row of the file gives it. The import always checks a new product. It checks an update only when source_id is ticked.
What an update writes
- Columns to overwrite lists the file's columns except
slugandsku, which only find the row. All are ticked exceptinventory_qty. New products and variants get every column. - An empty cell leaves the field as it is. With Empty cells clear the field, it empties the field. It never empties
title,status,variant_titleorinventory_qty.tax_categorybecomes standard. - The import writes
inventory_qtyon an existing variant only when the column is ticked and the stock is the same as at the preview. If something sold in between, the row stops with "stock changed since the preview". Preview again. - The import leaves a value it cannot read as it is and mentions it on the row. That covers status, VAT category and a price in another currency. A number that cannot be read in a price or dimension column stops the row.
Workflow
- Choose a mode.
- Paste the CSV text into the box. The import page shows the number of rows, missing required columns and ignored columns.
- Press Preview. The preview writes nothing. Each row gets a mark: NEW, UPDATE, UNCHANGED, NOT MATCHED or ERROR. The row also shows what changes, for example "default_price 1290 → 1190".
- Press Import. BunStack writes the plan from the preview row by row.
- Add new products to the storefronts, see Products in the storefronts.
Afterwards each row has the mark IMPORTED, UPDATED, UNCHANGED, WITH A NOTE or NOT IMPORTED. If you change the file, the mode or the ticks, preview again. If the import stops, for example because of the network, the page shows "Stopped at line N". The rows before it are written. Preview again to see what is left.
Export, edit, import again
Products › ⋯ › Export CSV downloads the products shown with the columns slug, title, status, default_price, default_compare_at_price, tags, description and short_description. Edit the file and import it under Update existing. The import writes only changed cells. Other rows become UNCHANGED.
The same vendor on many products:
- Export with Export CSV.
- Keep the
slugcolumn and add avendorcolumn with the vendor's name. - Import under Update existing with only
vendorticked.
You can also import the file from Inventory › Export CSV to change stock. The import reads the product_slug column as slug. Import under Update existing and tick inventory_qty. The import ignores product_title, inventory_policy and stock_status.