Importing Woocommerce Variable Products from CSV – WooCommerce Product Import Export Plugin

The Best Product Import Export Plugin for WooCommerce

#1 in WordPress Official Plugin Repository With 50,000+ Active Installs

#1 in Customer Satisfaction With Most 5 Star Reviews

WebToffee Guarantee: Get Your Money Back if You Are Not Satisfied With The Product

Buy Now!

The WooCommerce variable product helps to create multiple variations of a single product. This will save time and effort of store owners from creating each variation from scratch. To create variable products, you have to make use of product attributes.

You can conveniently import or export variable products using our Product Import Export Plugin for WooCommerce plugin. It imports all the details into your WooCommerce store without hassles. An important step here is to map the column header of the CSV file correctly with the fields of WooCommerce so that all product variations and attributes come up without any problems.

Note: The CSV Import file must be in UTF-8 format. For more information about UTF-8 encoding, See How to save CSV / Excel File as UTF-8 Encoded?

Let us now understand importing CSV file containing variable products.

Let’s consider we have a variable product ‘T-shirt’ with four variations. The variations are created with two attributes – Color (Blue & Red) and Size (L & XL). The four variations are represented by their SKUs as A11v1 (Blue-XL), A11V2 (Red-XL), A11V3 (Blue-L) and A11v4 (Red-L), as shown in the screenshot below.

Variable product import CSVIn the CSV file, make sure that you use both SKU and Parent_SKU in the CSV for a variation. The child products should always have a Parent_SKU.

Secondly, for every attribute in the CSV, for example, size,  the following 4 columns are required.
  • meta:attribute_size – This defines the values of the variations.
  • attribute:size – This defines all the possible values for the parent product.
  • attribute_data:size – This column is explained below
  • attribute_default:size  – It is the default size that will be displayed on the cart/checkout page.

The field meta is to be filled, only for the child products. The other three fields – attribute, attribute_data, and attribute_default is filled, only for parent products. Also, the field attribute_default can be left empty and is not mandatory to be filled.

Now, let us take a look at the column attribute_data. attribute_data value is displayed in the form of position | visible | variation.

  • position: Defines the position of the attribute in the front-end. For example, if you have 3 attributes and the value of the position is 0, it indicates that this attribute’s position is at the top of the variations list.
  • visible: If the attribute is visible at the front-end, the value will be displayed as 1. Else, 0.
  • variation: If the attribute is used for variation, the value will be displayed as 1. Else, 0.

Finally, please see the sample CSV and only provide data in parent products rows for fields like attribute:size and attribute_data:size. The variations should not have any value for these columns.

Note: Click Sample CSV of Variable Product to download it.

Following are the steps to import variable products:

  • Move to Import Products in CSV Format in the Import section of Product settings tab. Further settings appear as shown in the screenshot below.
Product Import Export-Import Products
Product Import Export-Import Products
  • You can choose either of the methods for uploading the CSV file. In this article, we are selecting the first method. That is, uploading a CSV file from your computer.

  • Click Choose File to browse a required CSV file from your computer.
  • Select a mapping file, or click Upload file and import to move ahead and create a new one.
  • Enter a mapping filename and map the required WooCommerce Product Fields with column headers of the CSV file. Use Evaluation Field to fix/update the required value for a particular field.
Product Import Export-Import Products-Map Fields
Product Import Export-Import Products-Map Fields
  • Click Submit to start importing products into your WooCommerce store.  

Based on the CSV file imported, the products and its attributes get added to your store, as shown in the screenshot below:

Variable product import successful product page

Once the import is successful, you can view the imported products in the WooCommerce Product page section.

WooCommerce products list

To view its variations, move to the Variations section in the respective product page.

WooCommerce products variations section

The variations in the product page will be displayed as shown below:Variation on product page

Another variation on product page
Another variation on product page

From the above screenshots, we can see the variable product – T-shirt is imported to the WooCommerce store with four variations (Blue-L, Red-L, Blue-XL, Red-XL). The variations are imported with the correct images, SKU name, regular price, attributes, and so on.

To know more about importing images, read our article on importing images.

For more information on importing and exporting of products, read this documentation.

The Best Product Import Export Plugin for WooCommerce

#1 in WordPress Official Plugin Repository With 50,000+ Active Installs

#1 in Customer Satisfaction With Most 5 Star Reviews

WebToffee Guarantee: Get Your Money Back if You Are Not Satisfied With The Product

Buy Now!

14 thoughts on “Importing Woocommerce Variable Products from CSV – WooCommerce Product Import Export Plugin

  1. Mani says:

    I need to add variable products, in similar vein to this tutorial, for affiliate products containing external links. I’m struggling to find the quickest method because currently the only way is manually adding custom links to each main product. I don’t think woocommerce allows us to add variables foe external/affiliate products – or am I wrong? Would your plugin support this?

    • Alan
      Alan says:

      Hi,

      By default, Woocommerce does not support adding variations to the external/affiliate products. Due to this reason, the same cannot be done using the Product import-export plugin.

  2. Jon says:

    Hey, When I import my variable products, the different prices do not work.
    For example. I have 3 variations, 250, 500 and 1000, and have added these values under the regular price column. After importing, the product says 250-100, so the range is good, but no matter what variant i select, the price stays at 250 despite this.

    • Alan
      Alan says:

      Hi,

      The issue you are facing might be because the variations are not created properly due to which the price is not changing while selecting the variants. Kindly make sure that the variable product data is provided in the correct format as mentioned in the documentation. If you are still facing any issue importing variable product please reach us via support.

    • Mark
      Mark says:

      Hi,

      The issue you are facing might be due to blank data in the post_title, post_excerpt, and post_content columns in your CSV. Please make sure that any of these columns are having data in it.

      If the issue still persists please reach us via support.

    • WebToffee
      Mark says:

      Hi Joyce,

      You can use our Product Import Export plugin to export and import any metadata stored with the products. The plugin supports the WooCommerce Extra Product Options plugin data.

  3. zeher
    zeher says:

    is the import of variants only working in the commercial version or also in the free version? I tried and could not manage the import of variants.

    • WebToffee
      Mark says:

      Hi,

      Variable products can be imported using the premium version only. Basic/Free version supports only simple products.

    • WebToffee
      Mark says:

      Hi Luis,

      You can import parent product and variation in the same CSV. Ensure that parent product comes before it’s variations in the CSV.

  4. danielb1
    danielb1 says:

    Hello. I am confused about the “attribute_data:size”. I read all about it and even did some test uploads but I can’t figure out what each number corresponds to. For example, if I have written “0 | 1 | 3”, what does that mean? What product variation/attribute does each number correspond with, and what effect does the number have on that variation/attribute? Thanks.

    • WebToffee
      Mark says:

      Hi,

      attribute_data value is displayed in the form of position | visible | variation.

      position: Defines the position of the attribute in the front-end. For example, if you have 3 attributes and the value of the position is 3, it indicates that this attribute’s position is at the top of the variations drop down list in the front end.
      visible: Give value as 1 if you want the attribute displayed at front end, 0 if you don’t want it in front end.
      variation: Give value 1 if you want to use the attribute for variations, 0 if you don’t want to use for variation.

      These control the default WooCommerce properties of an attribute.

Leave a Reply

Your email address will not be published. Required fields are marked *