-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: Framework/WebapiUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedProgress: needs update
Description
Preconditions
- Magento 2.1.8
Steps to reproduce
-
Import Attribute Option of type visual swatch (Color for example) over http request (API)
-
Code example:
{
$option = $this->attrOptionFactory->create();
$optionLabel = $this->attrOptionLabelFactory->create();$optionLabel->setStoreId(0); $optionLabel->setLabel('new_color'); $option->setLabel('new_color'); $option->setStoreLabels(array($optionLabel)); $this->productAttributeOptionManagement->add('color', $option);
}
Expected result
- New Attribute Option should be imported to backend
Actual result
- New Atttribute Option does not get imported because there is no entry in eav_attribute_option_swatch table
More info
Until Magento 2.1.7 the plugin did not trigger beforeSave function in swatches/Model/Plugin/EavAttribute and the Import data had not to match visual swatch data structure, it was imported
Since Magento 2.1.8 the function is renamed to beforeBeforeSave and the plugin triggers it,
so the Import data has to follow data structure of visual swatch, but since it is a API Import there is no entry in database and the new Option does not get imported
vctsvz and Ferrmolina
Metadata
Metadata
Assignees
Labels
Component: Framework/WebapiUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedProgress: needs update