Fix bug in admin interface where Bundle Option Select User Defined Qty setting is not loaded. #3020
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 (*)
After #3014, I found another similar issue on the Bundle Options admin screen.
This fixes a bug in the admin area when editing Bundle Items Options on a Bundle type product. When bundle option selection price type is "Fixed" or zero (0), "User Defined Qty" is not initialized with the selected value from the database because of an oversight in the check for existence of a variable with value zero (in the case of selection_price_type = "Fixed").
Related Pull Requests
#3014
Fixed Issues (if relevant)
Manual testing scenarios (*)
This happens because the javascript does not update the select element due to the "selection_price_type" evaluating to zero. Note that selection_price_type field may be hidden as it appears to be related to the overall product pricing settings.
Questions or comments
In doing more research, I found a similar problem fixed in a slightly different way: #2441 . I am not sure if you have any preference on the syntax.
Contribution checklist (*)