Skip to content

[Shop] Render the taxons list in the configured order and skip disabled taxons - #205

Open
JustMordeckai wants to merge 2 commits into
Sylius:1.1from
JustMordeckai:fix/204-taxons-list-order-and-enabled
Open

[Shop] Render the taxons list in the configured order and skip disabled taxons#205
JustMordeckai wants to merge 2 commits into
Sylius:1.1from
JustMordeckai:fix/204-taxons-list-order-and-enabled

Conversation

@JustMordeckai

Copy link
Copy Markdown
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #204
License MIT

TaxonsListContentElementRenderer fetched the configured taxons with a bare findBy(['code' => $codes]): the order the contributor picked in the admin form was thrown away in favour of database order, and taxons disabled in the catalog kept being rendered while the rest of the shop hides them. Details and reproduction in #204.

This PR reorders the fetched taxons by the configured code list and filters out disabled ones. Codes that resolve to no enabled taxon are simply skipped, so a list keeps rendering when one of its taxons is disabled or deleted.

Tests: the render test now asserts the configured order is preserved (codes requested in reverse database order), and a new test covers the disabled-taxon filtering. Full tests/Unit suite green (183 tests).

Same family as #119 (disabled products in grids/carousels), which this PR does not touch.

@JustMordeckai
JustMordeckai requested a review from a team as a code owner August 3, 2026 14:57
Comment thread src/Renderer/ContentElement/TaxonsListContentElementRenderer.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants