How To Import Configurable Product To Magento 2

- E-Commerce, Magento 2

improved import and export - Magento 2 extension

It is not a problem to import a single product to Magento 2, since you have all the necessary tools under System -> Export. But if you need to move configurable products from the old site, it may take a lot of time and effort, since in this situation the import procedure is much more sophisticated. It is still possible to import a configurable product with its simple products, and below we shed light on what is necessary for a successful import.

'

Download / Buy Firebear Improved Import Export Magento 2 Extension

Before performing an import, you should pass the following preparations:

  1. Create and define product attributes under Stores -> Attributes -> Products and assign them to an attribute set under Stores -> Attributes -> Attribute Set. Alternatively, you can use our Improved Import Export extension that allows creating new products attributes and values on the fly during the import process (if an attribute or a value doesn’t exist in the Magento 2 data base, it is created during the product import process).
  2. Set up categories to import the configurable product to (Products -> Categories).
  3. Note that neither simple nor configurable products should exist in the catalog before the importing procedure.

Next, it is necessary to prepare an import file. Unfortunately, Magento 2 supports CSV files only, but you can freely use TXT and XML files with our Magento 2 extension to import configurable products to your store.

As for the default requirements, a CSV file should use a comma as a separator for both fields and multiple values. Although the backend import interface allows you to change this parameter, it is not recommended to choose another separator, since it may cause issues.  As for other CSV file requirements, they are:

  1. List simple products only before the configurable product.
  2. The “attribute_set_code” field should match the Attribute Set (if you are not familiar with this parameter, it contains each product attributes).
  3. In the “configurable_variations” field, create a pipe separated set of sku/option combinations for each simple product. The field should be populated only for the configurable product. For the configurable T-shirt product: “sku=shirt-white,color=White|sku=shirt-black,color=Black”.
  4. The “configurable_variation_labels” field is designed for correlating the Attribute code to the Label Name. The field should be populated only for the configurable product. For the configurable T-shirt product: “color=Color”.
  5. As for the “additional_attributes” field, use it to list options for each simple product. Use comma separator for more than one attribute per simple product). For the White T-shirt: “color=White”; for the Black T-shirt: “color=Black”.

You can discover a CSV sample file here: Magento 2 Import/Export CSV/XML Samples.

Now when you know how to create an import file for a configurable product, go to System -> Import and click “Check Data”. The following procedure will validate the import file. If it has bad header options or unsupported format, the procedure may go down.

import configurable product Magento 2

If everything is OK, click the “Import” button. Once the import of your configurable product is complete, check whether everything was imported correctly: all associated simple products are available.

If there are no associated simple products, your import file likely had unsupported format, so you should configure it more carefully. Alternatively, you can use the Improved Import Export Magento 2 extension by Firebear, since it supports mapping. Map all custom attributes to system ones and run import successfully.

For further information about the import process, follow this link: Magento 2 – Import Configurable Products.

While talking about configurable product import, we should also draw your attention to how to import different product content for each store view.

In case of the first Magento version, you can easily import different content for each store view simultaneously by placing each store data in new line with empty sku field. This approach doesn’t work for Magento 2.

In case of translations, you can import them separately, adding store_view_code with the appropriate value:

But you also deleted default name from the database. Luckily, there is another solution.

Simply import all store views together in one import, the default one should be included as well. Note that SKU must be set for each store view:

You will update the existing products with different product content for each store view. It doesn’t work as initial import. Add required attributes for initial insert. For further information, follow this link: How to import product content different for each store view (translations/multilingual)?

If you want to simplify import processes, check our extension as well:

Download / Buy Firebear Improved Import Export Magento 2 Extension

And if you need to get advanced functionality for configurable products (dynamic frontend updates, default options, matrix grid, etc), follow this link:

Download / Buy Firebear Improved Configurable Product Magento 2 Extension

'