Closed ascheider closed 1 year ago
It seems that the importer always set the type to object in saveConcrete-Method in Importer.php file. So the variant import is currently not supported?
Correct, variant import is currently not supported. In the real world object, variants do not have any advantages compared to real objects. The problem is that when you create variants and one day want to extend your data model to allow another hierarchy level below your variant objects, you will have a serious problem.
Of course it would not be much effort to add another field object type
in attribute mapping... but somebody has to convince me with a use-case where object variants make more sense than real objects.
Okay, thanks for the feedback. We have currently object structure with native variants which works like variants in shopware shop, so we have to import the data in this way. In my opinion it should be possible to import native variants, because pimcore have this possibility by default. Data importer of pimcore supports this kind of import. We changed to data director, because it much better in many ways. I was shocked that variant import is not supported here;) Please give me feedback if you will integrate the possibility, otherwise i will integrate something 'dirty' on pimcore.dataobject.postUpdate event for the customer.
I have also seen clients use this shopware plugin which dictates the Pimcore data model. In my opinion this is the completely wrong approach to a PIM system because you should never adjust the data model to a certain output channel.
But I also know the pragmatic reality that clients want a Pimcore and connect it to Shopware and so they swallow the bitter pill of using the bundle's data model and not one which is optimized efficient data maintainance... so I will add object type
to attribute mapping...
Can you please write to info@blackbit.de? Will not take much time to implement but also small features need to be paid by somebody...
@ascheider We have implemented this feature. You can try it out when using composer version constraint 3.3.x-dev
. When it works (or you are not allowed to use such a dev dependency), please notify me, then we will release a new version (probably 3.3.2).
@BlackbitDevs Hey, thanks for the integration. Unfortunately i can not test the feature in the project, because i have conflicting dependency with version 3.3. Could you please merge your commit into 3.2 and create 3.2.38 for example? Would appreciate it! Thanks!
Have you run composer update blackbit/data-director --with-dependencies
? Because I wonder which dependency may cause a conflict. Alternatively could you please send the exact error message?
If this fails, I can also put it into 3.2 but actually current stable is 3.3 and it is a new feature - so putting it into 3.2 would be against semantic versioning (but I can make an exception if above fails but first I would like to know if we have a dependency problem in 3.3).
@BlackbitDevs We are currently migrating from pimcore/data-importer to data director. Some profiles are still in use with data-importer. I already executed with-dependencies. It seems it is not possible to install data director v3 if data-importer is installed.
@ascheider Please see https://github.com/pimcore/pimcore/discussions/9988
You have to either also update pimcore/data-importer
or completely remove it.
But I do not want to cause any stress, so I added the object type mapping also in 3.2.x-dev
. This should be possible to install. If it works for you, please notify me, then I will release a new 3.2.x version.
@BlackbitDevs Hi,
i just tested import of the variants, but unfortunately it does not work. Class and profile and stack trace is in the zip-file Archiv_variants.zip The variant should be created under Test_Object in my example:
@ascheider, sorry my fault. Have fixed this. Please try again with 3.2.x-dev
. For me it works:
(have used different import data than you)
@BlackbitDevs Hi,
unfortunately still have errors: trace-integrity.txt
This is caused by the first import from today morning. Please check the objects
table and delete the item with o_key='Test_Object_Variant'
. This was created today morning but the following SQL query failed. Thus you now have this remaining data without a real object variant.
Alternatively please use a different object name.
@BlackbitDevs Hi,
sorry my bad. Now it works fine 👍
Released this feature in 3.2.38 / 3.3.7.
I want to import object variants. If i click on attribute mapping, i don't see type field where i can map object or variant for example. Or do i miss something? I have nothing found in the handbook regarding variants. Thanks!