magento2-connector-community icon indicating copy to clipboard operation
magento2-connector-community copied to clipboard

Image Attributes aren't synced correctly

Open Rocheauxfees opened this issue 2 years ago • 4 comments
trafficstars

Hi there,

currently we are faced by some problems to synchronise some images from Akeneo to Magento by using the configuration at the "Product Images Mapping" section in the configuration page by the connector. We are using Magento 2 in the version 2.4.2-p1 (enterprise) as a multi-store-view-instance, the Akeneo Connector in Version 100.4.5 and Akeneo PIM in Version 3.2.34. Unfortunatley we aren't able to update neither magento nor the connector nor Akeneo PIM.

image

By using these settings we get the result to have images sychronised to the parent but not set as base, thumbnail, small-image or cta_image for the all stores view. Also the synchronised images are all hidden. The mentioned image attribute image_grid by Akeneo is global.

image

If we change to a store view (e.g. the Japanese one) these images are all visible and set as base and thumbnail but not as small-image or cta_image.

image

Do you have any advice where to search for a mis-configuration? Do we have to set something in the configurable section of the configuration page by the connector?

Many thanks for your help in advance.

Best

Rocheauxfees avatar Jan 12 '23 10:01 Rocheauxfees

Currently experiencing the same issue. We select image_1 to have all the attributes however the highest image gets all attributes assigned. This is probably an issue within the connector..

REFUZIION avatar Feb 14 '23 17:02 REFUZIION

We facing the same issue. Is there a fix for this?

rabillion avatar Mar 15 '23 10:03 rabillion

Hi, We had the same issue and while debugging this. we found a possible problem around this part:
vendor/akeneo/module-magento2-connector-community/Job/Product.php We applied a patch to fix the wrong column name without a suffix, which had a - after it, and also we made a check to only set image roles when the $columnName is the same as $image:

`diff --git a/app/code/Product.php b/app/code/Product.php index 0c9f023b..b0f218b5 100644 --- a/app/code/Product.php +++ b/app/code/Product.php @@ -3944,7 +3944,10 @@ class Product extends JobImport

                     foreach ($columns as $column) {
                         /** @var string $columnName */
  •                        $columnName = $column['column'] . self::SUFFIX_SEPARATOR . $suffix;
    
  •                        $columnName = $column['column'] . ($suffix ? (self::SUFFIX_SEPARATOR . $suffix) : '');
    
  •                        if ($columnName !== $image) {
    
  •                            continue;
    
  •                        }
                           /** @var mixed[] $mappings */
                           $mappings = $this->configHelper->getWebsiteMapping();
                           /** @var string|null $locale */`
    

roxanadicomaria avatar Mar 25 '23 16:03 roxanadicomaria

We had the same problem as reported by @REFUZIION and @rabillion. Applied a Rewrite of the importMedia function with the patched changes provided by @roxanadicomaria and it now works as expected for us.

Thanks guys.

Using Akeneo_Connector 103.3.1 and Magento Community 2.4.5.

itlinlab avatar Apr 28 '23 00:04 itlinlab