Shopify import fix

Shopify: Invalid variant

Shopify found a row with option values but no parent product to attach them to. This happens when the first row of a product has an empty Handle while later rows of the same product do not.

How to fix it

  1. Open your CSV and sort by Handle, so rows of the same product are adjacent.
  2. Make sure the FIRST row of every product has the Handle filled in.
  3. Leave Handle empty on subsequent rows of the same product; that is how variants attach.
  4. Check that every variant row has all three option values filled, even if blank options are unused.
  5. Re-import the file.

How to avoid it next time

Build the file in Shopify's own column order and never sort it before import. Sorting separates a product's rows and breaks the parent-child relationship.

Check the whole file before you import again

The free Shopify CSV checker names the exact line for each of these problems. The paid Rescue Kit adds 20 more error cases, a template in Shopify's column order, and the checker as a script you can run in a pipeline.

See the Rescue Kit →

Shopify builds a variant matrix from the columns, not from the rows. It reads Option1 Name and Option1 Value on the first row of a product to define the axis, then expects every following row with that handle to supply a value for it.

The usual cause. The first row of a product has an empty Handle while the later rows have it filled. Shopify sees the later rows as belonging to a product it has not defined yet, and the option values have no axis to attach to.

The second cause. Sorting the file before import. Sorting groups rows alphabetically by handle, which is fine, but it also reorders rows within a product so a variant row can end up before the row carrying the title.

The third cause. A product with Option1 Name filled but Option2 Name empty, while some rows try to supply a second option value. The axis does not exist.

What a correct block looks like. First row: handle, title, body, vendor, Option1 Name = Size, Option1 Value = M, price. Second row: same handle, everything before Option1 left empty, Option1 Value = L, price. Nothing else changes.

Questions

Do I need to repeat the title on every variant row?

No. Only the first row of a product needs the title; repeating it is treated as a duplicate.

Can a product have no options?

Yes, but then it has exactly one variant and you still supply a single option value.

Why does the import say invalid variant on a row that looks complete?

Check the row's position. If the first row of that handle has an empty title, this row has no parent.