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.
This commit is contained in:
@@ -67,7 +67,8 @@
|
|||||||
"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 *)",
|
"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 *)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ interface DesignApproval {
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
basePrice: number;
|
basePrice: number;
|
||||||
personalisedPrice: number;
|
personalisedPrice: number | null;
|
||||||
effectivePrice: number;
|
effectivePrice: number;
|
||||||
};
|
};
|
||||||
designJson: string;
|
designJson: string;
|
||||||
@@ -165,7 +165,7 @@ export default function DesignReviewPage({ params }: { params: { id: string } })
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<p className="border-t border-line pt-3">
|
<p className="border-t border-line pt-3">
|
||||||
<strong>Price:</strong> £{(design.product.effectivePrice / 100).toFixed(2)}
|
<strong>Price:</strong> £{((design.product.personalisedPrice ?? design.product.effectivePrice) / 100).toFixed(2)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user