Open JoostWan opened 4 years ago
Hello @JoostWan
Environment and configuration
- Akeneo version: 3.2.10
- Magento version 2.3.4
- Akeneo connector version: 100.4.2
Steps to reproduce
- Added mapping for configurable product. In the case we want to use the Akeneo attribute conf_name for the Magento attribute name.
- Run the product import.
Expected result
Configurable product uses the value of conf_name and simple products used default value from Akeneo attribute name.
Actual result
Configurable product uses the value of conf_name and simple products has a empty name.
Debugging
I checked the code and the table _tmp_akeneo_connector_entitiesproduct. In our database the column name was name-nl_NL-ecommerce. When the sync was ready and the config mapping was enabled for name there was a new column with name-nl_NL. This column had the correct values for config products. But was empty for simple products. So the mapping function creates a new column instead of updating the correct column (name-nl_NL-ecommerce) with the new value.
Fixed it for now with this so ecommerce is added to the column name.
https://github.com/akeneo/magento2-connector-community/blob/master/Job/Product.php#L852
$mapping = $value . '-' . substr($column, $pos + 1) . '-' . $this->scopeConfig->getValue(ConfigHelper::AKENEO_API_ADMIN_CHANNEL);
How did you solve this issue ?
Environment and configuration
Steps to reproduce
Expected result
Configurable product uses the value of conf_name and simple products used default value from Akeneo attribute name.
Actual result
Configurable product uses the value of conf_name and simple products has a empty name.
Debugging
I checked the code and the table _tmp_akeneo_connector_entitiesproduct. In our database the column name was name-nl_NL-ecommerce. When the sync was ready and the config mapping was enabled for name there was a new column with name-nl_NL. This column had the correct values for config products. But was empty for simple products. So the mapping function creates a new column instead of updating the correct column (name-nl_NL-ecommerce) with the new value.
Fixed it for now with this so ecommerce is added to the column name.
https://github.com/akeneo/magento2-connector-community/blob/master/Job/Product.php#L852
$mapping = $value . '-' . substr($column, $pos + 1) . '-' . $this->scopeConfig->getValue(ConfigHelper::AKENEO_API_ADMIN_CHANNEL);