fix product export of configurable_variations for configurable products with multiple super attributes #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
Default export functionality outputs invalid data for configurable products having more than one super attribute.
Column
configurable_variations
should contain all child SKUs, with the unique super attribute values of each one.Instead, it outputs only the first SKU matched for each super attribute value.
Invalid, with attributes color and size: Note that most SKUs do not include both size and color. Only one row is output for each size and each color. (I put each SKU on a new line for clarity.)
Corrected: All child SKUs are output, with all super attribute values for each.
The issue was the core code iterating over super attributes and options (one match for each separate value), not over the combinations of super attributes and options (one match for each combination of values). I changed the loop to iterate over assigned child products and then output each super attribute in order, for each one.
Related Pull Requests
N/A
Fixed Issues (if relevant)
Manual testing scenarios (*)
configurable_variations
to confirm whether all child products and options are represented.Questions or comments
Contribution checklist (*)