-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Allow import of empty attributes #13472
Allow import of empty attributes #13472
Conversation
Any progress on this issue? Unit tests are failing but is because of Travis :) |
@PieterCappelle thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Hi @PieterCappelle for feedback from testing. There is no human-readable validation message when "custom_options" is set to "EMPTYVALUE" even if there was no value before. When you setup the "custom_options" field to "EMPTYVALUE" you end up with the notice There is a validation for name, SKU and price properties on Backend, however for unknown reasons Merchant is able to create products without price using WebAPI.
I think that if we have validation for empty values in the backend we should have the same validation in the import. |
I have updated this PR so that it now includes the deletion of custom options via the csv using the empty value option added by @PieterCappelle |
…learEmptyData if statement Updating the formatting for the new if in clearEmptyData so that it fits the coding standards.
…learEmptyData if statement
…product options match expected style - if product options is equal to our new empty value constant than do not try to process it as normal
…atch coding standards
…ptions via csv via constant
…mpty value constant
…mpty value constant
Hi @PieterCappelle. Thank you for your contribution. |
Does this work for all types of attributes? I have applied this patch to a magento 2.2.5 instance, and although this does work for text fields, it doesn't work as expected for boolean fields and dropdown fields. Empty values for these kinds of fields are saved as NULL, causing them to be displayed as 'No' on the product details page. If I remove the records with value NULL from the As a quick fix, I have extended
|
Allow import of empty attributes in Magento2 import functionality. See internal number MAGETWO-61593.
Fixed Issues (if relevant)
Contribution checklist