# Problem with import of product data - variant

**URL:** <https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718>\
**Category:** International (English Only)\
**Tags:** programming\
**Created:** [21. August 2018 um 10:11 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718 "2018-08-21T10:11:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanami](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@hanami](https://forum.shopware.com/u/hanami)\
**Post date:** [21. August 2018 um 10:11 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718/1 "2018-08-21T10:11:21Z")

</div>

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:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/e/e799def3dfb76f34021b349f63818b8e24d71b2f.jpeg)

Pic 2:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/c/ca5779c54309ec870a93aba669c1921ae5cebfea.jpeg)

Pic 3:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/8/83380510c8741db5185c63e2d5075e195753bd05.jpeg)

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [21. August 2018 um 12:49 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718/2 "2018-08-21T12:49:25Z")

</div>

Hi&nbsp;Hanami,

Welcome to the Shopware Community!&nbsp; ![Smile](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/bac5f5766b6a20565a8fb995345b4e41d24daac0.png "Smile")

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

Maybe this pages could also help:&nbsp;[Debugging Shopware](https://developers.shopware.com/developers-guide/debugging/)&nbsp;[https://en-community.shopware.com/\_detail\_1912.html](https://en-community.shopware.com/_detail_1912.html)

Best regards from Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![odessite](https://avatars.discourse-cdn.com/v4/letter/o/f05b48/32.png) [@odessite](https://forum.shopware.com/u/odessite)\
**Post date:** [21. August 2018 um 15:44 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718/3 "2018-08-21T15:44:06Z")

</div>

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](https://www.shopping-cart-migration.com/), prices not really big and they provide support.

---

<div class="post-metadata">

**Author:** ![hanami](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@hanami](https://forum.shopware.com/u/hanami)\
**Post date:** [22. August 2018 um 04:23 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718/4 "2018-08-22T04:23:02Z")

</div>

> [@Michael Telgmann schrieb:](https://forum.shopware.com/profile/17553/Michael%20Telgmann "Michael%20Telgmann")
> 
> Hi&nbsp;Hanami,
> 
> Welcome to the Shopware Community!&nbsp; ![Smile](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/smile.png "Smile")
> 
> How does the initial request looks like? Are the variants already missing there? Are there some javascript errors in the console?&nbsp;
> 
> Maybe this pages could also help:&nbsp;[https://developers.shopware.com/developers-guide/debugging/](https://developers.shopware.com/developers-guide/debugging/)&nbsp;[https://en-community.shopware.com/\_detail\_1912.html](https://en-community.shopware.com/_detail_1912.html)
> 
> Best regards from Schöppingen
> 
> ![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

Hi Michael Telgmann,

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

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?&nbsp;&nbsp;

Thanks a lot.&nbsp;

Hanami.&nbsp;

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [22. August 2018 um 07:36 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718/5 "2018-08-22T07:36:20Z")

</div>

Hi Hanami,

you should not write your own importer for the products especially when you are new to Shopware&nbsp; ![Wink](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/b3785da0cbf2c8566cb535dcf55b2730b5224899.png "Wink")&nbsp;There are many cases you might have not thought of.&nbsp;

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

Best regards from Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![hanami](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@hanami](https://forum.shopware.com/u/hanami)\
**Post date:** [22. August 2018 um 11:27 UTC](https://forum.shopware.com/t/problem-with-import-of-product-data-variant/54718/6 "2018-08-22T11:27:59Z")

</div>

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.&nbsp;

Hanami.&nbsp;
