If you need to import variation groups with a CSV file, you can do so with WooCommerce Linked Variations and WP All Import Pro.
Setting up your CSV file
To create your CSV file, open up your program of choice and use the following as a template.
Your CSV should look like this:
|Product IDs||Attributes||Show Image?||Title||Style|
|90,96,93,99||pa_color,pa_size||1||Your Group Name||buttons|
- The Product IDs column contains a comma separated list of the product IDs in your group. You can also use product SKUs in this column.
- The Attributes column contains a comma separated list of attribute slugs to link your products by.
- The Show Image? column contains a 1 or a 0. Should the first attribute use the product image.
- The Title column is your group title. It’ll also be used as the unique identifier (or you can add another column for that).
- The Style column should be either ‘buttons’ or ‘dropdown’. This is how the attribute values will be displayed on the product page.
Once you’ve set up your file, save it as a CSV and you’re reading to import.
Importing your CSV file
To import your CSV file, take the following steps:
Note: You need to have WP All Import Pro installed on your site for the next steps to make sense.
- From your WordPress dashboard, go to All import > New Import.
- Upload your CSV file.
- Once uploaded, click New items and then select Linked Variations from the dropdown.
- Now click Continue to Step 2.
- Check your data, then click Continue to Step 3.
- Drag the title cell into the Title field.
- Now create 4 custom fields; iconic_wlv_product_ids (or iconic_wlv_product_skus, if you used SKUs), iconic_wlv_attributes, iconic_wlv_show_image, and iconic_wlv_style.
- Make sure you drag the correct spreadsheet data into the Value part of the custom fields.
- Click Continue to Step 4.
- Set a Unique Identifier.
- Now click Continue.
- Now click Confirm and Run import.
Your groups will now be imported and the products assigned accordingly!
Note: Make sure post actions are not disabled during the import process. This can be set on the final step before import.