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:
co-authored by
Claude Haiku 4.5
parent
904b0f5838
commit
1b5a9f8d28
@@ -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's shown in your preview above — spelling, wording, and
|
||||
placement included. Once your order's placed, that design goes straight to print,
|
||||
approximate placement included. Once your order's placed, that design goes straight to print,
|
||||
so take a moment to make sure everything looks right.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user