Magento2: Configurable products import doesn't work configurable_variations not imported

Created on 28 Jul 2016  Â·  31Comments  Â·  Source: magento/magento2

Preconditions

  1. PHP 7.0.6
  2. MySQL CE 5.6.30
  3. Magento 2.1.0

Steps to reproduce

Create a CSV with 3 virtual products and one configurable product.
The only attribute configurable is COLOR.
Add to the CSV (screenshot attached) the additional_attributes field, as well as configurable_variations and configurable_variation_lables.

Expected result

The import procedure should create three virtual products and one configurable and using the configurable_variations and configurable_variation_labels connect the three virtual products to the configurable one.

Actual result

Imported file:
screen shot 2016-07-28 at 22 09 38

Exported file:
As you can see Magento ignore both configurable_variations and configurable_variation_labels fields making the import successful but configurable products fail.
screen shot 2016-07-28 at 22 14 44

ImportExport Clear Description Confirmed Format is valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x bug report

Most helpful comment

Hi @akamura ,

I am in progress with your issue. I found that "problem" is in store_view_code field. If it is empty - products are successfully imported with configurable options. But if there is any value - it fails. I need some more time to discuss this with my colleagues.

All 31 comments

Even in Magento official guide I haven't found anything related to configurable_variations or configurable_variation_labels

http://docs.magento.com/m2/ce/user_guide/system/data-attributes-product.html

This is very strange since if you create and configure a configurable product from the backend and then you export the CSV file those two fields have data inside.

I even did the following test:

  1. Create a product configurable (3 virtual products, 1 configurable)
  2. Save and export the CSV file
  3. Delete the product created
  4. Without editing the CSV file exported just reimport it
  5. Magento create 3 virtual product and 1 configurable correctly but it didn't recognize the configurable_variations fields so the configurable product basically doesn't have any relation with the three virtual resulting in an empty product.

Hi

Thank you for your request, but unfortunately I can't reproduce this issue. I have CE 2.1.0 and one configurable product with 2 virtual products which were successfully exported and reimported. You can check my sample .csv file in attached .zip archive. Could you try to import it? And don't forget to reindex your indexes to have last data (http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-index.html#config-cli-subcommands-index-reindex)

Probably error can occured only with some specific data, so could you help me and provide detailed steps to reproduce the same situation as on your server? I will appreciate it!

Thanks!
I am looking forward to getting response from you.

sample.zip

Hi,
import was successful but there is still a problem.

After import I navigate to the category where the configurable product is supposed to be, and the category is empty.
So I search for product SKU "CPr" and result is product not found.

I login to the backend and search for "CPr" as you can see Configuration is empty. If I manually create the configuration then the configurable product appear correctly on the frontend.
screen shot 2016-08-26 at 11 13 59

I tried with my CSV file also and the result is the same.

I'm running Magento 2.1.0

Thanks
Marcos

Hi,
Have you tried to rebuild your indexes after import?
You can find information about them in Admin-System-Tools-Index Management
And to rebuild index you need to use this command in cli
php bin/magento indexer:reindex

Hi AzVo,
yes I executed the rebuild from the commandline but the product is still misconfigured.

I attach you my file that I have edited since I have different attribute_set and websites code.
catalog_product_20160818_143015 2.csv.zip

Thanks
Marcos

@AzVo did you tried with my file?

Thanks
Marcos

Hi @akamura ,

I am in progress with your issue. I found that "problem" is in store_view_code field. If it is empty - products are successfully imported with configurable options. But if there is any value - it fails. I need some more time to discuss this with my colleagues.

Hi again

I have created internal ticket for this bug (#MAGETWO-58213) to fix it. This issue will be closed after fix.

Thanks for help!

@AzVo thank you very much

Having the same problem.
Will be glad to see the fix))

For those who find this issue and can't import configurables properly even with store_view_code not set, here is how I solved the issue:

The field 'configurable_variations' must be formated like this:

"sku=xxx##color=black|sku=yyy##color=yellow"

Where ## is your multiple value separator

Here is the corresponding code

when i export configurable item with multiple text swatches only one text swatch is exported(at field configurable_variations)

Having the same (or similar) problem: relations to simple products won't import for configurable product when store view is specified in the CSV file.

@AzVo Any updates on the core fix?

Try the import and turn down errors to one - it is usually my fault when this happens.

If anyone imported configurable product with color and size or more attributes , please send file here. i am having this issue. thank you

@Yonn-Trimoreau ...I need to import configurable products with color and size attributes and thats not working. Can you please help me or you can send me demo file which work on 2.1.2. I can also upgrade my version to 2.1.3 i am not sure if this issue is fixed because i didnt find anything related to importing configurable product. Thanks

Sorry @jarnail104, I don't have the import file neither the project anymore..

Try with 'configurable_variations' row formatted like this :

"sku=xxx##color=black##size=37|sku=yyy##color=yellow##size=38"

And set your multiple value separator to "##".

If you can't manage to make it work, send us a stack trace or an error code, or maybe your file and some details about how that's not working.

Good luck

Hello guys,

I had the same problem in Magento 2.1.3 and solved it for me.

I had to add the attributes in configurable_variations also in the additional_attributes field. After that Magento recognize the connection between the configurable and simple product.

Good luck.

Hello guys,

Hi @fmd-sav I tried to add the key fields in the additional_attributes but it does not work :(

This how looks my configurable_variations:
sku=MX_2303024_31,size=25|sku=MX_2303024_32,size=25.5

How can I add these keys to the additional_attributes?, only for the configurable product? or for every simple product?

Thx a lot

Hi,
is there a simple_file.csv that can be used as test to import a configurable product with size and color variations?

I'm not able to import it in magento 2.1.6
thanks
Iacopo

Create one in the interface and export a csv - it will show you exactly how it is done.

I have this problem also - configurable products are imported correctly when "store_view_code" is empty, but as soon as I set it, the products are not correctly associated anymore. Import still works, just the connection between the products somehow doesn't work out.

Is there a solution that I missed? I need to import products for three different store views and any help would be greatly appreciated.

i try to import standard product in single website/storeview configuration.
Import works if file csv is exported from magento2 with all fields.
I hope it can help you.

Iacopo

2017-05-09 10:38 GMT+02:00 Sonja notifications@github.com:

I have this problem also - configurable products are imported correctly
when "store_view_code" is empty, but as soon as I set it, the products are
not correctly associated anymore. Import still works, just the connection
between the products somehow doesn't work out.

Is there a solution that I missed? I need to import products for three
different store views and any help would be greatly appreciated.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/5876#issuecomment-300099181,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAuE7U1B7VFkYnKW6xaYW90f_ycSegSVks5r4CYbgaJpZM4JXmVy
.

--
Iacopo Pecchi
E-commerce Specialist & Project Manager
http://www.consulente-ecommerce.it
tel. +39 328 9381301
[email protected]
P.IVA: 02084840517
skype: iacopopecchi

I want to import the attach CSV file to magento 2.0.10. I have successfully import this csv, but the options for the configurable product not display in frontend. Alreday reindex and clear cache.
catalog_product_20170605_101740.zip

@akamura, thank you for your report.
We've created internal ticket(s) MAGETWO-58213 to track progress on the issue.

Any Update on this issue

Hello guys,

I had the same problem in Magento 2.1.3 and solved it for me.

I had to add the attributes in configurable_variations also in the additional_attributes field. After that Magento recognize the connection between the configurable and simple product.

Good luck.

Great It works.

In the additional_attributes column you just need to define your attribute code and its value.
In my case it was conf_size=Large single variation.You may have to define more value if more then one attribute.

I am facing the same issue in Magento2.3.
any solution?

I'm facing the same issue in Magento 2.4.0 EE. Any solution for this?

Was this page helpful?
0 / 5 - 0 ratings