Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable products import doesn't work configurable_variations not imported #5876

Closed
akamura opened this issue Jul 28, 2016 · 33 comments
Closed
Labels
bug report Component: ImportExport Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@akamura
Copy link

akamura commented Jul 28, 2016

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

@akamura
Copy link
Author

akamura commented Aug 3, 2016

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.

@AVoskoboinikov
Copy link
Contributor

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

@akamura
Copy link
Author

akamura commented Aug 26, 2016

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

@AVoskoboinikov AVoskoboinikov self-assigned this Aug 26, 2016
@AVoskoboinikov
Copy link
Contributor

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

@akamura
Copy link
Author

akamura commented Aug 26, 2016

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

@akamura
Copy link
Author

akamura commented Sep 2, 2016

@AZVO did you tried with my file?

Thanks
Marcos

@AVoskoboinikov
Copy link
Contributor

AVoskoboinikov commented Sep 5, 2016

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.

@AVoskoboinikov
Copy link
Contributor

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!

@AVoskoboinikov AVoskoboinikov added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 9, 2016
@akamura
Copy link
Author

akamura commented Sep 9, 2016

@AZVO thank you very much

@AVoskoboinikov AVoskoboinikov removed their assignment Sep 12, 2016
@alexnos88
Copy link

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

@Yonn-Trimoreau
Copy link

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

@erik-augustin
Copy link

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

@sshymko
Copy link

sshymko commented Nov 7, 2016

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?

@LiamFielding
Copy link

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

@jarnail104
Copy link

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

@jarnail104
Copy link

@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

@Yonn-Trimoreau
Copy link

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

@fmd-sav
Copy link

fmd-sav commented Feb 1, 2017

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.

@JosueTorresM
Copy link

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

@iacopop
Copy link

iacopop commented Apr 13, 2017

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

@LiamFielding
Copy link

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

@sonjaka
Copy link

sonjaka commented May 9, 2017

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.

@magento-engcom-team magento-engcom-team added the Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release label Oct 10, 2017
@jigar48
Copy link

jigar48 commented Nov 4, 2017

Any Update on this issue

@piotrekkaminski
Copy link
Contributor

The issues was moved to: magento-engcom/import-export-improvements#90

magento-engcom-team pushed a commit that referenced this issue Feb 26, 2018
magento-engcom-team pushed a commit that referenced this issue Feb 26, 2018
magento-engcom-team pushed a commit that referenced this issue Feb 26, 2018
magento-engcom-team pushed a commit that referenced this issue Feb 26, 2018
magento-engcom-team pushed a commit that referenced this issue Feb 26, 2018
magento-engcom-team pushed a commit that referenced this issue Feb 26, 2018
magento-engcom-team pushed a commit that referenced this issue Apr 18, 2018
magento-engcom-team pushed a commit that referenced this issue Apr 18, 2018
magento-engcom-team pushed a commit that referenced this issue Apr 18, 2018
@zaheerbadi
Copy link

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.

@dipak85shinde
Copy link

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

magento-engcom-team pushed a commit that referenced this issue Jul 14, 2020
[trigger] MC-35776: WsdlGenerationFromDataObjectTest is failed with PHP 7.4.6
@Arul2020
Copy link

Arul2020 commented Sep 2, 2020

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

@ghost
Copy link

ghost commented Dec 23, 2021

It still doesn't work for 2.4.3

@php4umagento
Copy link
Contributor

Broken on 2.4.6-p3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: ImportExport Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests