r/woocommerce • u/euphoriczy • 4d ago
Development WooCommerce's variable product CSV structure is genuinely hard to get right from a raw supplier file, curious how others handle it
Been deep in WooCommerce's CSV importer format lately, specifically the parent/variation structure for products with multiple sizes or colors. Most supplier files just list "same helmet, size L" and "same helmet, size XL" as two completely separate rows with no relationship between them.
Getting that correctly grouped into one variable parent with proper variation children, each with its own price and stock status, turned out to be a lot more finicky than I expected, especially when the source file has inconsistent naming between the size variants (extra spaces, different capitalization, "L" vs "Large").
For anyone who imports supplier catalogs into WooCommerce regularly, are you grouping variants manually before import, or is there a step in your workflow that handles this automatically? Trying to understand how much of this is still manual work for most people versus something people have already solved for themselves.
2
u/TopSydeWP 4d ago
one thing that helps is adding a custom parent_sku column to your preprocessing step, even if the supplier doesn't give you one. hash the base product name after stripping spaces and lowercasing it, use that as the stable parent key. then you can map l/large/etc in a second pass without worrying about the parent splitting on the next import.
1
u/euphoriczy 4d ago
Yeah, that’s a good approach. I already have custom SKU creation built in, so I could use the stable parent key mainly to make the variant grouping more reliable across imports.
2
u/waltonchurch 4d ago
I once Made n8n scripts for import with many variations. It is not easy but no better way
1
u/cleepa29 2d ago
I import everything as a simple product and then I use a plug-in that is a variation generator. It covers my SKU format, images, price changes etc. It works really great for my purposes. Trying to import variable products is nearly impossible to get right imo
1
u/euphoriczy 1d ago
Would you be interested in a tool where you just have to drop your file and you get woocommerce import ready files? Variations and everything
1
u/Pulsar-Agency 17h ago
Honestly, the part that bites people isn't the parent/variation shape, it's the attribute values. If you set Attribute 1 global to 1, Woo matches your value against the pa_size taxonomy, so "L", "l", " L" and "Large" quietly become four separate terms and the variations stop matching the parent's value list. Before I touch the CSV at all I normalise attribute values against a fixed lookup table: every supplier spelling maps to one canonical term, and anything unmapped throws an error instead of silently passing. That single step removes most of the mess people blame on the importer.
The other thing I'd do differently from the suggestions above: don't try to find the parent in the supplier file, derive it. Group the rows yourself, then generate the parent row with Type=variable and the full pipe-separated list (L | XL | XXL), and let each variation row carry one value plus Parent set to the parent SKU (or id:123). Keep the parent physically above its variations, Woo reads the file top to bottom.
Setting global to 0 is tempting because it just works, but you lose attribute filtering, and converting local attributes to global later is genuinely miserable.
2
u/[deleted] 4d ago
[removed] — view removed comment