Skip to content

A product page reached through a category path keeps core's product URL - #45

Merged
Sental merged 1 commit into
mainfrom
category-assignment-ids
Oct 23, 2026
Merged

Sental merged 1 commit into
mainfrom
category-assignment-ids

Conversation

@Sental

@Sental Sental commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Written by Claude Code:

With "Use Categories Path for Product URLs" on, a product page reached through a category path rendered the category URL on the documents path (og:url, the Organization JSON-LD), where core renders the product's own URL.

Product::getCategoryId() applies the current category only when getCategoryIds() contains it. Core reads catalog_category_product. The document model took categoryIds, the category product index, which adds the anchor ancestors. So on /women/tops-women/breathe-easy-tank, category 25 applied on the documents path only.

The products feed now carries categoryAssignmentIds (Provider/CategoryAssignments, the rows of catalog_category_product), and the model's category_ids takes them. categoryIds stays the index for the readers that need it. The et_schema.xml change re-exports every product row.

Verified: listing and detail parity gates identical at MAX_REQUESTS 1 and 3. The documents path read product documents on every page, with no catalog_category_product read and no change in SQL count.

🤖 Generated with Claude Code

The document model took its category ids from the category product index, which adds the anchor ancestors, so the page's category applied where core's assignments do not and the product URL took the category path. The model now takes the product's category assignments, as core does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Sental
Sental merged commit 784b08b into main Oct 23, 2026
8 checks passed
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.

1 participant