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:
@@ -65,7 +65,8 @@
|
|||||||
"Bash(git revert *)",
|
"Bash(git revert *)",
|
||||||
"Bash(git commit -m 'Fix price display issues and layout in design review page *)",
|
"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: 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 *)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default function DesignReviewPage({ params }: { params: { id: string } })
|
|||||||
color: design.color,
|
color: design.color,
|
||||||
size: design.size,
|
size: design.size,
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
unitPrice: design.product.effectivePrice,
|
unitPrice: design.product.personalisedPrice ?? design.product.effectivePrice,
|
||||||
designJson: design.designJson,
|
designJson: design.designJson,
|
||||||
designPreviewUrl: design.designPreviewUrl,
|
designPreviewUrl: design.designPreviewUrl,
|
||||||
designPreviewUrlBack: design.designPreviewUrlBack,
|
designPreviewUrlBack: design.designPreviewUrlBack,
|
||||||
|
|||||||
Reference in New Issue
Block a user