akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
85 stars 89 forks source link

Images are not imported in Magento; imprt reports attribute does not exist #283

Open MarcoVanRijn opened 4 years ago

MarcoVanRijn commented 4 years ago

Magento Version: 2.3.4 Extension Version: 100.4.8 Akeneo Version: 4.0.47 CE

Akeneo

  1. Created attribute 'mvr_image' type Image in Akeneo
  2. Added this attribute to a family
  3. Edit product and add an image to 'mvr_image'

Magento

  1. Settings: image

  2. import attributes, family

  3. import product

image

It is my first Akeneo - Magento project. So i'm not sure it is a bug or another (install/environment/setting) issue

Thanks Marco van Rijn

cengizcoskun commented 4 years ago

It can be bug.

Did you check column name on akeneo temp table?

Job/Product.php Function: importMedia Line: 2439 if (!$connection->tableColumnExists($tmpTable, strtolower($image)))

VincentMarmiesse commented 3 years ago

Hi, I have a similar issue if the image on Akeneo side is localizable.

It seems the Akeneo connector does not take this into account and looks for the attribute code instead of <image_attribute_code>-en_US for example.

schnere commented 2 years ago

Magento Version: 2.4.2 Extension Version: 102.1.2 Akeneo Version: 5.0.55

The problem still exists. Unfortunately @VincentMarmiesse 's solution does not work, because the language code in the database is stored as en_US but the attribute code is converted to lowercase: https://github.com/akeneo/magento2-connector-community/blob/10430f6003d609c4fae6a212504c2a9dca001d3f/Job/Product.php#L3173

So to be able to import those images I've removed the strtolower in the code so that it works now.

As far as I can see in a quick code review the images are always set for global scope. So it is okay to choose a default locale for synchronization. But at the moment it is not possible to set localized images through the connector.

oefterdal commented 2 years ago

Have similar issue https://github.com/akeneo/magento2-connector-community/issues/586