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

In product list all swatches are always shown even if they are not available when "Display Out of Stock Products" is disabled #4099

Conversation

empiricompany
Copy link
Contributor

@empiricompany empiricompany commented Jul 17, 2024

Description (*)

In the product list, all swatches are always shown even if they are not available.
You can verify this on the PDP because only the available ones are displayed correctly.

Tested with both enabled and disabled stock inventory configuration "Display Out of Stock Products"
inventory_settings

When "Display Out of Stock Products" is enabled shown correctly like this:
show_out_of_stock

When "Display Out of Stock Products" is disabled all swatches are always shown even if they are not available.
With this patch shown correctly like this:

not_out_of_stock

The bug occurs when the " Display Out of Stock Products" configuration is disabled.

Related Pull Requests

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. Create configurable product with options as swatch such as color
  2. Set stock unavailable for one color option

Example with sample data:

  1. In product configurable Name: "Nolita cami" SKU "wbk000c" set all children products with color pink unavailable.

In the product list, all colors are always shown even if they are not available.
You can verify this on the PDP because only the available ones are displayed correctly.

pdp
pl

Questions or comments

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

@empiricompany empiricompany changed the title Product list all swatches are always shown even if they are not available when "Display Out of Stock Products" is disabled In product list all swatches are always shown even if they are not available when "Display Out of Stock Products" is disabled Jul 17, 2024
@github-actions github-actions bot added Component: Newsletter Relates to Mage_Newsletter Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches translations Relates to app/locale labels Jul 17, 2024
@github-actions github-actions bot removed the Component: Newsletter Relates to Mage_Newsletter label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Don't forget this PR translations Relates to app/locale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants