Problem with import of product data - variant

Hello,

I am new in forum.

I want to import the product data from my old shop to shopware shop system. But I have a problem with variant.

After importing product data into database, the variant admin page only shows one. (Pic 1)

If I click on ‘Apply standard data’ and untick one of the options, all the variants then appear correctly. (Pic 2 & 3)

Can somebody tell me, what is wrong here?

Thank you,

Hanami

Pic 1:

Pic 2:

Pic 3:

Hi Hanami,

Welcome to the Shopware Community!  Smile

How does the initial request looks like? Are the variants already missing there? Are there some javascript errors in the console? 

Maybe this pages could also help: Debugging Shopware https://en-community.shopware.com/_detail_1912.html

Best regards from Schöppingen

cool Michael Telgmann

1 „Gefällt mir“

Import should have right structure.

If you are familiar with programming you can debug it by yourself as described above.

If no - I can propose you to check cart2cart, prices not really big and they provide support.

1 „Gefällt mir“

@Michael Telgmann schrieb:

Hi Hanami,

Welcome to the Shopware Community!  Smile

How does the initial request looks like? Are the variants already missing there? Are there some javascript errors in the console? 

Maybe this pages could also help: https://developers.shopware.com/developers-guide/debugging/ https://en-community.shopware.com/_detail_1912.html

Best regards from Schöppingen

cool Michael Telgmann

Hi Michael Telgmann,

Thanks for your reply. Actually I created a commandline plugin and use Doctrine for the imported data.  

The importing process does not output any errors and the data is inserted into database. However, when I view them on admin, the variants are missing without unticking an option in ‚Apply standard data‘. I have not managed to find the culprit yet. Maybe I am missing sometuing regarding the product database structure. Can you shed me some light on that?  

Thanks a lot. 

Hanami. 

Hi Hanami,

you should not write your own importer for the products especially when you are new to Shopware  Wink There are many cases you might have not thought of. 

I would suggest to use a plugin like our Import/Export Tool Shopware Import/Export | Backend-Bearbeitung | Administration | Erweiterungen | Shopware Community Store
Or you use the API resource classes shopware/engine/Shopware/Components/Api/Resource at 5.4 · shopware/shopware · GitHub within your own plugin. Use the Shopware\Components\Api\Manager::getResource(‘Variant’) method to get an instance of theses classes. 

Best regards from Schöppingen

cool Michael Telgmann

1 „Gefällt mir“

Hi Michael,

thank you for your reply.

Up to now I used the API Classes and the method „getResource(‚Variant‘)“ for my import plugin. The importing process does not output any errors and the data is inserted into database. But the Problem is still there. I will look the Import/Export Toll.

But do you have any Idea, how can I find the error here?

Thanks a lot. 

Hanami.