-
Notifications
You must be signed in to change notification settings - Fork 9.4k
CatalogImportExport doesn't support empty row values #7468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Addendum to this; If chosen to support the constant value, support should also be implemented in \Magento\CatalogImportExport\Model\Import\Product\Validator in the isAttributeValid function.
|
@koenner01 thank you for your feedback. |
I have found a problem when using the empty logic; If you try to import an empty value '' for a product's special_price, it will result in special_price 0. The problem is an insert being doing in \Magento\CatalogImportExport\Model\Import\Product in function _saveProductAttributes:
If an empty string value is being inserted into the entity_int or entity_decimal tables they result into value 0. |
Another issue in the same clearEmptyData function #10006 |
Any update on this from the Magento team? |
@koenner01, thank you for your report. |
This issue was moved to magento-engcom/import-export-improvements#49 |
If you have an attribute that has a value and you import an empty string because the value needs to be empty, the attribute will not be overwritten with the empty string.
Preconditions
Steps to reproduce
(I'm using description as my example)
Expected result
Actual result
This issue can be traced back to \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType where the clearEmptyData function unsets all empty rows.
It is my opinion that support for empty rows should be allowed.
My suggested fix is adding a constant to the AbstractType class and set the row values that contain that constant value to an empty string. That way if the constant value is used in the import csv, the importer will know which fields are just empty and which fields contain empty values.
It would be even better to allow for setting custom values for the EMPTY_ROW_VALUE constant through the backend.
The text was updated successfully, but these errors were encountered: