|
|
@@ -20,9 +20,13 @@ export default function ContinueToPayOrderInfo({
|
|
|
}) {
|
|
|
|
|
|
const router = useRouter();
|
|
|
- const {getCurrentCurrencyItem} = useConfig();
|
|
|
+ const {currencies,getCurrentCurrencyItem} = useConfig();
|
|
|
const currentCurrency = getCurrentCurrencyItem();
|
|
|
const currencySymbol = currentCurrency.symbol;
|
|
|
+ const orderCurrency = currencies.find(item => item.code === orderDetail.orderCurrencyCode) || null;
|
|
|
+ const orderSymbol = orderCurrency?.symbol || currencySymbol;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const [productsModalOpen, setProductsModalOpen] = useState(false);
|
|
|
|
|
|
@@ -158,23 +162,23 @@ export default function ContinueToPayOrderInfo({
|
|
|
<h3 className="text-ly-24 font-medium">Promotion Details</h3>
|
|
|
<div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-12 leading-ly-20">Subtotal</p>
|
|
|
- <p className="text-ly-12 leading-ly-20">{currencySymbol}{orderDetail.subTotal}</p>
|
|
|
+ <p className="text-ly-12 leading-ly-20">{orderSymbol}{orderDetail.subTotal}</p>
|
|
|
</div>
|
|
|
<div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-12 leading-ly-20">Shipping</p>
|
|
|
- <p className="text-ly-12 leading-ly-20">{currencySymbol}{orderDetail.shippingAmount}</p>
|
|
|
+ <p className="text-ly-12 leading-ly-20">{orderSymbol}{orderDetail.shippingAmount}</p>
|
|
|
</div>
|
|
|
<div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-12 leading-ly-20">Tax</p>
|
|
|
- <p className="text-ly-12 leading-ly-20">{currencySymbol}{orderDetail.taxAmount}</p>
|
|
|
+ <p className="text-ly-12 leading-ly-20">{orderSymbol}{orderDetail.taxAmount}</p>
|
|
|
</div>
|
|
|
<div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-12 leading-ly-20">Discount</p>
|
|
|
- <p className="text-ly-12 leading-ly-20">{currencySymbol}{orderDetail.discountAmount}</p>
|
|
|
+ <p className="text-ly-12 leading-ly-20">{orderSymbol}{orderDetail.discountAmount}</p>
|
|
|
</div>
|
|
|
<div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-12 leading-ly-20">Gift Card</p>
|
|
|
- <p className="text-ly-12 leading-ly-20">-{currencySymbol}{orderDetail.giftcardAmount}</p>
|
|
|
+ <p className="text-ly-12 leading-ly-20">-{orderSymbol}{orderDetail.giftcardAmount}</p>
|
|
|
</div>
|
|
|
{/* <div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-12 leading-ly-20">You Earn</p>
|
|
|
@@ -182,7 +186,7 @@ export default function ContinueToPayOrderInfo({
|
|
|
</div> */}
|
|
|
<div className="flex justify-between mt-3 first:mt-0">
|
|
|
<p className="text-ly-16 leading-ly-24">Total</p>
|
|
|
- <p className="text-ly-16 leading-ly-24 font-bold">{currencySymbol}{orderDetail.grandTotal}</p>
|
|
|
+ <p className="text-ly-16 leading-ly-24 font-bold">{orderSymbol}{orderDetail.grandTotal}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -191,7 +195,7 @@ export default function ContinueToPayOrderInfo({
|
|
|
<ProductsModalPendingOrder
|
|
|
isOpen={productsModalOpen}
|
|
|
products={productItems}
|
|
|
- currencySymbol={currencySymbol}
|
|
|
+ currencySymbol={orderSymbol}
|
|
|
onClose={() => closeProductsModal()}
|
|
|
/>
|
|
|
</>
|