Itemised order confirmation via OrderReadPort (ADR 0026) - #5
Merged
Conversation
The /order page (already IDOR-gated by the nb_order cookie) now shows what was bought, not just the reference. StorefrontCart reads Commerce's public-safe OrderReadPort and resolves each line's SKU to a display name via CatalogReadPort (active → name, else the SKU itself). Null-safe: no OrderReadPort (Commerce absent) → today's ref-only view, never a 500. The page stays private (no-store). Reviewed via both skills, security-green. Tests: itemised summary with name resolution + inactive-SKU fallback; ref-only fallback without Commerce. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…null string) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
/orderconfirmation (already IDOR-gated by thenb_ordercookie) now shows what was bought, not just the reference.StorefrontCart::orderSectionreads Commerce's public-safeOrderReadPortand resolves each line's SKU to a display name viaCatalogReadPort(active → name; inactive/deleted → the SKU itself).OrderReadPort(Commerce absent) → today's ref-only view, never a 500. The page stays private (no-store); the IDOR gate is unchanged.shop-ordertemplate renders the itemised list + total, escaped.Reviewed via both skills, security-green. Tests: itemised summary + name resolution + inactive-SKU fallback; ref-only fallback without Commerce. (CI pulls commerce
dev-main, which now hasOrderReadPort.)🤖 Generated with Claude Code