Skip to content

Fix: visibility#135

Merged
ahuininga-orisha merged 2 commits intobetafrom
fix-visibility
Mar 6, 2026
Merged

Fix: visibility#135
ahuininga-orisha merged 2 commits intobetafrom
fix-visibility

Conversation

@ahuininga-orisha
Copy link
Collaborator

@ahuininga-orisha ahuininga-orisha commented Mar 4, 2026

This pull request fixes two issues with the visibility

Problem 1

Previously, when a child product's visibility was added to a composite product's visibility attribute, it caused unintended behavior if the composite product itself was set to be hidden in either Search or the Catalog.

Example Scenario:

Configurable Parent: Set to "Catalog" visibility, but "Not in Search."
Simple Child: Set to "Search" visibility, but "Not in Catalog."

Current Situation (Before Fix)

When the child's visibility was injected or added to the composite product, the system incorrectly tried to display the composite product in areas where it should have remained hidden (like the Catalog or Search results), or it created conflicts in how Tweakwise filtered the grouped entity. This led to "ghost" products or items appearing in the wrong context because the composite product inherited visibility it should not have had.

Fixed Situation

The logic has been refined to ensure that adding child visibility to a composite product does not break the composite's own visibility restrictions.

The composite product now correctly respects its own "Not Visible Individually" or "Catalog Only" status.

The system now accurately distinguishes between when to show the parent and when to allow the child to drive visibility without "leaking" that visibility back to the parent in an incorrect context.

How to test

  • Set up the products like in the example scenario
  • Run the magento indexer
  • Make sure grouped products is disabled in the export
  • Run the tweakwise export
  • See in the export feed that the visibility for the product only contains catalog.

The Problem 2 (grouped products)

When using grouped products, child visibility is currently ignored. This causes products to disappear from search results because the system only evaluates the Parent's visibility settings.

Example Scenario:

Configurable Parent: Set to "Catalog" visibility, but "Not in Search."
Simple Child: Set to "Search" visibility, but "Not in Catalog."

Current Situation

In the Catalog: The configurable product is shown, and the simple product is hidden. (Correct)
In Search: The simple product is NOT SHOWN because it is missing from the Tweakwise results. (Incorrect)

This happens because the system switches to "parent visibility" logic, but that logic does not include the child's visibility data. Since the Parent is hidden from Search, Tweakwise excludes the product entirely.

Desired Situation

In the Catalog: The configurable product should be shown, but the simple product should be hidden.
In Search: The simple product should be shown, but the configurable product should be hidden.

How to test

Test test icm with EmicoEcommerce/Magento2Tweakwise#353

Use the how to test in that issue

@ahuininga-orisha ahuininga-orisha merged commit 235e240 into beta Mar 6, 2026
1 check passed
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

🎉 This PR is included in version 7.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants