webgriffe / SyliusAkeneoPlugin

Plugin allowing to import data from Akeneo PIM to your Sylius store.
https://webgriffe.github.io/SyliusAkeneoPlugin/
MIT License
23 stars 3 forks source link

Handling of common attribute of type "image" #94

Open jorgerucoba opened 3 years ago

jorgerucoba commented 3 years ago

Hey there! I am dealing with the following situation: In Akeneo I have a product model with a variant of 1 axis. The product model has a common attribute named Image, and the axis has another attribute named ImageVariant. When I import them to Sylius, the common Image gets imported n times as existent variants.

Shouldn't it get imported only once, as it is a common attribute?

This is how I configured the import of those attributes in webgriffe_sylius_akeneo_plugin.yaml

        image:
            type: 'image'
            options:
                akeneo_attribute_code: 'image'
                sylius_image_type: 'image'        

        image_variant:
            type: 'image'
            options:
                akeneo_attribute_code: 'variation_image'
                sylius_image_type: 'variation_image'`

Have I mistaken something in my configuration? Or is it a matter of enhancement of the plugin. Thanks in advance.

Best regards.

mmenozzi commented 3 years ago

Hi @jorgerucoba, we didn't tested this behavior yet but if it's like you say this sounds like a bug.

I don't know when we're be able to fix it. If you need it fixed soon feel free to provide a PR.

Thank you for your feedback anyway.