magento2-connector-community
magento2-connector-community copied to clipboard
Duplicate attribute value
We had a issue with duplicate attribute values. The client used unique values in Akeneo but not for the language labels. The Akeneo import loops trough the stores based on languages. In this case the admin store used nl_NL as default language so the value of nl_NL is used and multiple options get 1
as value.
Array
(
[nl_NL] => Array
(
[0] => Array
(
[store_id] => 0
[store_code] => admin
[is_website_default] => 1
[siblings] => Array
(
[0] => 0
)
[website_id] => 0
[website_code] => admin
[channel_code] => ecommerce
[lang] => nl_NL
[currency] => EUR
)
[1] => Array
(
[store_id] => 1
[store_code] => nl
[is_website_default] => 1
[siblings] => Array
(
[1] => 1
[7] => 7
[15] => 15
[4] => 4
[13] => 13
[12] => 12
[14] => 14
[8] => 8
[11] => 11
[9] => 9
[6] => 6
[10] => 10
)
[website_id] => 1
[website_code] => base
[channel_code] => ecommerce
[lang] => nl_NL
[currency] => EUR
)
.....
For now i fix this by changing the next line https://github.com/akeneo/magento2-connector-community/blob/master/Job/Option.php#L358
with this:
'value' => ($store['website_id'] == 0) ? 'code' : 'labels-' . $local,
Now the admin value get's the code/admin value of the attribute from Akeneo.
Have the same issue.