Fix: Use personalised price in design approval cart add

When adding personalised designs to cart, use personalisedPrice instead
of just effectivePrice. This ensures the cart shows the correct price
for made-to-order items from the start, matching what Stripe calculates.
This commit is contained in:
Andymick
2026-07-18 19:59:25 +01:00
parent fae1ce04c2
commit 6b2072b0a7
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -65,7 +65,8 @@
"Bash(git revert *)",
"Bash(git commit -m 'Fix price display issues and layout in design review page *)",
"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: Handle designJson as string in checkout API *)",
"Bash(git commit -m 'Fix: Use personalised price in design approval cart add *)"
]
}
}
+1 -1
View File
@@ -58,7 +58,7 @@ export default function DesignReviewPage({ params }: { params: { id: string } })
color: design.color,
size: design.size,
quantity: 1,
unitPrice: design.product.effectivePrice,
unitPrice: design.product.personalisedPrice ?? design.product.effectivePrice,
designJson: design.designJson,
designPreviewUrl: design.designPreviewUrl,
designPreviewUrlBack: design.designPreviewUrlBack,