Update warning text and fix missing price in cart

- Change warning to say 'approximate placement' instead of just 'placement'
- Add missing cartItemId, name, mockup, unitPrice, and preview URLs when adding design to cart
- Fixes NaN price display for designs added from approval page

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-18 19:36:01 +01:00
co-authored by Claude Haiku 4.5
parent 904b0f5838
commit 1b5a9f8d28
2 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ export default function CartPage() {
<p className="font-medium text-ink">Please check your design before checking out</p>
<p className="mt-1 text-muted">
We print exactly what&apos;s shown in your preview above spelling, wording, and
placement included. Once your order&apos;s placed, that design goes straight to print,
approximate placement included. Once your order&apos;s placed, that design goes straight to print,
so take a moment to make sure everything looks right.
</p>
</div>
+12 -1
View File
@@ -50,11 +50,22 @@ export default function DesignReviewPage({ params }: { params: { id: string } })
// Add to cart
addItem({
cartItemId: crypto.randomUUID?.() || Math.random().toString(36).substr(2, 9),
productId: design.productId,
slug: design.product.id, // Using product ID as slug for now
name: design.product.name,
mockup: design.product.id,
color: design.color,
size: design.size,
designJson: design.designJson,
quantity: 1,
unitPrice: design.product.effectivePrice,
designJson: design.designJson,
designPreviewUrl: design.designPreviewUrl,
designPreviewUrlBack: design.designPreviewUrlBack,
placementPreviewUrl: design.placementPreviewUrl,
placementPreviewUrlBack: design.placementPreviewUrlBack,
designWidthCm: null,
designHeightCm: null,
});
alert('Design approved! Added to your bag.');