Canonical-URL für Produktvarianten (#21) #64

Merged
csaeum merged 2 commits from feature/varianten-adressen into main 2026-09-19 19:41:34 +00:00
Owner

Zusammenfassung

  • Canonical der Produktseite zeigt unabhängig von der gewählten Ausführung immer auf den Hauptartikel
  • Eine vollständig gewählte Ausführung bekommt zusätzlich eine eigene, teilbare Adresse (/p/winter-cap-l), gebildet aus den Labels der Optionswerte — nicht aus ProductVariant::$name, das je nach Shop-Konfiguration den vollen Produktnamen enthält
  • ShopRouteLoader löst eine noch nie ausgelieferte Variantenadresse per Präfix-Zerlegung selbst auf, damit ein geleerter Cache oder ein von einer Suchmaschine noch bekannter Link nie zu einem falschen 404 führt
  • Permalink „Diese Ausführung verlinken" auf der Produktseite

Details, Entscheidungen und Live-Prüfung im Abschlusskommentar zu #21.

Test plan

  • 415 Tests grün (Unit, Routing, ProductPageRenderTest mit echten Templates)
  • php-cs-fixer und PHPStan Level 8 ohne Befund
  • Live in DDEV geprüft: Canonical stabil über Optionswahl, bekannte Variantenadresse ohne Redirect, nie ausgelieferte Adresse nach Cache-Leerung liefert 200 statt 404, entfernte Ausführung 404, andere Produkte/Kategorien unverändert

Closes #21

🤖 Generated with Claude Code

## Zusammenfassung - Canonical der Produktseite zeigt unabhängig von der gewählten Ausführung immer auf den Hauptartikel - Eine vollständig gewählte Ausführung bekommt zusätzlich eine eigene, teilbare Adresse (`/p/winter-cap-l`), gebildet aus den **Labels der Optionswerte** — nicht aus `ProductVariant::$name`, das je nach Shop-Konfiguration den vollen Produktnamen enthält - `ShopRouteLoader` löst eine noch nie ausgelieferte Variantenadresse per Präfix-Zerlegung selbst auf, damit ein geleerter Cache oder ein von einer Suchmaschine noch bekannter Link nie zu einem falschen 404 führt - Permalink „Diese Ausführung verlinken" auf der Produktseite Details, Entscheidungen und Live-Prüfung im Abschlusskommentar zu #21. ## Test plan - [x] 415 Tests grün (Unit, Routing, `ProductPageRenderTest` mit echten Templates) - [x] php-cs-fixer und PHPStan Level 8 ohne Befund - [x] Live in DDEV geprüft: Canonical stabil über Optionswahl, bekannte Variantenadresse ohne Redirect, nie ausgelieferte Adresse nach Cache-Leerung liefert 200 statt 404, entfernte Ausführung 404, andere Produkte/Kategorien unverändert Closes #21 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Canonical on the product page always points at the base product regardless
of the selected option, and a fully selected variant now gets its own
shareable address (product slug + option value labels). ShopRouteLoader
gains a fallback that resolves a never-before-delivered variant address by
trying progressively shorter slug prefixes against real products, so a
search engine link or a cleared cache never turns into a false 404 for a
product that still exists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
docs(shop-seo): describe canonical and variant addresses for #21
All checks were successful
CI / cs-check (push) Successful in 22s
CI / phpstan (push) Successful in 37s
CI / phpunit (push) Successful in 33s
CI / build-release (push) Has been skipped
c6a4b14a99
Document the permalink and canonical behaviour in the README, correct the
now-outdated "no second address" claim in architecture.md and add a full
section on the decisions and the cold-path fallback, and bring STATUS.md
up to date.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
csaeum merged commit b6be74a8a5 into main 2026-09-19 19:41:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Sulu-Bundles/wsc_sulubundle_syliusheadless!64
No description provided.