Skip to content

[Issue] Fix swatch-renderer.js #39925

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

Open
5 tasks
m2-assistant bot opened this issue May 20, 2025 · 2 comments · May be fixed by #39924
Open
5 tasks

[Issue] Fix swatch-renderer.js #39925

m2-assistant bot opened this issue May 20, 2025 · 2 comments · May be fixed by #39924
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Reported on 2.4.x Indicates original Magento version for the Issue report.

Comments

@m2-assistant
Copy link

m2-assistant bot commented May 20, 2025

This issue is automatically created based on existing pull request: #39924: Fix swatch-renderer.js


Fix for "Uncaught TypeError: salableProducts is undefined" when no variant is available

Description (*)

This code fixes an error, when a configurable product has no available variant.

This is the JS error in the browser console:

Uncaught TypeError: salableProducts is undefined        swatch-renderer.js:514:29
    disableSwatchForOutOfStockProducts Magento_Swatches/js/swatch-renderer.js:514
    jQuery 2
    disableSwatchForOutOfStockProducts Magento_Swatches/js/swatch-renderer.js:511
    each jQuery
    disableSwatchForOutOfStockProducts Magento_Swatches/js/swatch-renderer.js:504

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
@m2-assistant m2-assistant bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label May 20, 2025
@m2-assistant m2-assistant bot linked a pull request May 20, 2025 that will close this issue
6 tasks
@ct-prd-projects-boards-automation ct-prd-projects-boards-automation bot moved this to Ready for Development in High Priority Backlog May 20, 2025
@engcom-Bravo engcom-Bravo self-assigned this May 20, 2025
Copy link
Author

m2-assistant bot commented May 20, 2025

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.x Indicates original Magento version for the Issue report. label May 20, 2025
@engcom-Bravo
Copy link
Contributor

Hi @fisch42,

Thanks for your reporting and collaboration.

We have tried to reproduce the issue in Latest 2.4-develop instance and we are not able to reproduce the issue.Kindly refer the screenshots.

Image

we are not getting any console error when a configurable product has no available variant.

Could you please elaborate the steps to reproduce if possible please provide screenshots or screencast to proceed further.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Reported on 2.4.x Indicates original Magento version for the Issue report.
Projects
Status: Ready for Development
Development

Successfully merging a pull request may close this issue.

1 participant