From 404f17acb285b40a36b1ad0b6ced93a1518615d6 Mon Sep 17 00:00:00 2001 From: Andymick Date: Sat, 18 Jul 2026 20:02:48 +0100 Subject: [PATCH] Fix: Show personalised price on design review page Design review pages are always for personalised products, so display the personalised price instead of the base effective price. This ensures the preview page shows the same price that will be charged at checkout. --- .claude/settings.local.json | 3 ++- src/app/designs/[id]/review/page.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 482f7f8..584ca81 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -67,7 +67,8 @@ "Bash(git commit -m 'Fix: Calculate effectivePrice in design API endpoints *)", "Bash(git commit -m 'Fix: Handle designJson as string in checkout API *)", "Bash(git commit -m 'Fix: Use personalised price in design approval cart add *)", - "Bash(git commit -m 'Fix: Safely access designJson properties in admin orders page *)" + "Bash(git commit -m 'Fix: Safely access designJson properties in admin orders page *)", + "Bash(git commit -m 'Fix: Show personalised price on design review page *)" ] } } diff --git a/src/app/designs/[id]/review/page.tsx b/src/app/designs/[id]/review/page.tsx index 4c6951c..3802620 100644 --- a/src/app/designs/[id]/review/page.tsx +++ b/src/app/designs/[id]/review/page.tsx @@ -13,7 +13,7 @@ interface DesignApproval { id: string; name: string; basePrice: number; - personalisedPrice: number; + personalisedPrice: number | null; effectivePrice: number; }; designJson: string; @@ -165,7 +165,7 @@ export default function DesignReviewPage({ params }: { params: { id: string } })

)}

- Price: £{(design.product.effectivePrice / 100).toFixed(2)} + Price: £{((design.product.personalisedPrice ?? design.product.effectivePrice) / 100).toFixed(2)}