Skip to content
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

Fix bug in admin interface where Bundle Option Select User Defined Qty setting is not loaded. #3020

Conversation

rfeese
Copy link
Contributor

@rfeese rfeese commented Feb 10, 2023

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)

  1. Fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. In Admin interface, Create or Edit a Bundle type product.
  2. On the "Bundle Items" tab, Create / Edit an existing Option.
  3. Add a Selection if one does not already exist.
  4. Change the "User Defined Qty" on a Selection to "No".
  5. Save and Continue or Save and return to Edit the product.
  6. Notice that "User Defined Qty" is not loaded with the value "No".

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 (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

…n zero. Fixes a bug where admin screen didn't load User Defined Qty value into select element.
@github-actions github-actions bot added Component: Adminhtml Relates to Mage_Adminhtml Component: Bundle Relates to Mage_Bundle Template : admin Relates to admin template labels Feb 10, 2023
@fballiano fballiano merged commit 36219b2 into OpenMage:1.9.4.x Feb 11, 2023
fballiano pushed a commit that referenced this pull request Feb 11, 2023
@fballiano
Copy link
Contributor

merged and cherrypicked to v20

elidrissidev pushed a commit to elidrissidev/magento-lts that referenced this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Adminhtml Relates to Mage_Adminhtml Component: Bundle Relates to Mage_Bundle Template : admin Relates to admin template
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants