2025-12-27 10:03:53 +07:00
|
|
|
|
import type { ProductDetailData } from '@/types';
|
|
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
|
|
|
|
|
|
|
import { BoxPrice } from './BoxPrice';
|
2025-12-27 12:01:54 +07:00
|
|
|
|
import { BoxBought } from './BoxBought';
|
2025-12-27 10:03:53 +07:00
|
|
|
|
|
|
|
|
|
|
export const BoxInfoRight = (item: ProductDetailData) => {
|
|
|
|
|
|
return (
|
|
|
|
|
|
<>
|
2025-12-27 12:01:54 +07:00
|
|
|
|
<h1 className="product-name color-black line-clamp-3 font-bold">
|
|
|
|
|
|
{item.product_info.productName}
|
|
|
|
|
|
</h1>
|
2025-12-27 10:03:53 +07:00
|
|
|
|
<div className="list-basic-product-info flex flex-wrap items-center">
|
|
|
|
|
|
<div className="item-basic">
|
|
|
|
|
|
Mã SP: <span className="color-primary">{item.product_info.productSKU}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="item-basic">
|
|
|
|
|
|
Đánh giá: <span className="color-primary">{item.product_info.review.summary.total}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="item-basic">
|
|
|
|
|
|
Bình luận:{' '}
|
|
|
|
|
|
<span className="color-primary">{item.product_info.comment.summary.total}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="item-basic">
|
|
|
|
|
|
Lượt xem: <span className="color-primary">{item.product_info.visit}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{item.product_info.extend.buy_count?.length > 0 && (
|
|
|
|
|
|
<div className="item-basic last-item-basic position-relative">
|
|
|
|
|
|
Đã bán: <span className="color-primary">{item.product_info.extend.buy_count}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{/* tình trạng */}
|
|
|
|
|
|
<div className="list-basic-product-info flex flex-wrap items-center gap-6">
|
|
|
|
|
|
<div className="item-basic">
|
|
|
|
|
|
Bảo hành: <span className="color-red">{item.product_info.warranty}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{item.product_info.quantity > '0' && (
|
|
|
|
|
|
<div className="item-basic last-item-basic position-relative">
|
|
|
|
|
|
Tình trạng: <span className="color-green">Còn hàng</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{/* giá */}
|
|
|
|
|
|
<BoxPrice {...item} />
|
|
|
|
|
|
{item.product_info.specialOffer.all.length > 0 && (
|
|
|
|
|
|
<div className="box-offer-detail border-radius-10">
|
|
|
|
|
|
<div className="title-offer-detail flex items-center">
|
|
|
|
|
|
<i className="sprite sprite-gift-detail"></i>
|
|
|
|
|
|
<p className="font-weight-600">Khuyến mãi</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="list-info-offter">
|
|
|
|
|
|
{item.product_info.specialOffer.all.map((_item, idx) => (
|
|
|
|
|
|
<div key={idx} className="item-offer">
|
|
|
|
|
|
<i className="icon"></i>
|
|
|
|
|
|
<div dangerouslySetInnerHTML={{ __html: _item.title }} />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
|
|
|
|
|
{/* mua hàng */}
|
|
|
|
|
|
{(item.product_info.quantity > '0' || item.product_info.price > '0') && (
|
|
|
|
|
|
<>
|
|
|
|
|
|
<div className="product-buy-quantity flex items-center">
|
|
|
|
|
|
<p className="title-quantity">Số lượng:</p>
|
|
|
|
|
|
<div className="cart-quantity-select flex items-center justify-center">
|
|
|
|
|
|
<p className="js-quantity-change" data-value="-1">
|
|
|
|
|
|
{' '}
|
|
|
|
|
|
−{' '}
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<input
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
className="js-buy-quantity js-quantity-change bk-product-qty font-bold"
|
|
|
|
|
|
defaultValue={1}
|
|
|
|
|
|
/>
|
|
|
|
|
|
<p className="js-quantity-change" data-value="1">
|
|
|
|
|
|
{' '}
|
|
|
|
|
|
+{' '}
|
|
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
2025-12-28 21:43:14 +07:00
|
|
|
|
<Link href="#" className="addCart flex flex-wrap items-center justify-center gap-3">
|
2025-12-27 10:03:53 +07:00
|
|
|
|
<i className="sprite sprite-cart-detail"></i>
|
|
|
|
|
|
<p className="title-cart">Thêm vào giỏ hàng</p>
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
<input type="hidden" className="js-buy-quantity-temp" value="1" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="detail-buy-ads" className="detail-buy grid grid-cols-2 gap-2">
|
2025-12-28 21:43:14 +07:00
|
|
|
|
<Link href="#" className="detail-buy-now col-span-2">
|
2025-12-27 10:03:53 +07:00
|
|
|
|
<span>ĐẶT MUA NGAY</span>
|
|
|
|
|
|
Giao hàng tận nơi nhanh chóng
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
2025-12-28 21:43:14 +07:00
|
|
|
|
<Link href="#" className="detail-add-cart">
|
2025-12-27 10:03:53 +07:00
|
|
|
|
<span>TRẢ GÓP QUA HỒ SƠ</span>
|
|
|
|
|
|
Chỉ từ 2.665.000₫/ tháng
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
2025-12-28 21:43:14 +07:00
|
|
|
|
<Link href="#" className="detail-add-cart">
|
2025-12-27 10:03:53 +07:00
|
|
|
|
<span>TRẢ GÓP QUA THẺ</span>
|
|
|
|
|
|
Chỉ từ 1.332.500₫/ tháng
|
|
|
|
|
|
</Link>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</>
|
|
|
|
|
|
)}
|
2025-12-28 21:43:14 +07:00
|
|
|
|
n{/* yên tâm mua hàng */}
|
2025-12-27 12:01:54 +07:00
|
|
|
|
<div className="box-product-policy-detal boder-radius-10" style={{ marginTop: '24px' }}>
|
|
|
|
|
|
<h2 className="title font-[600]">Yên tâm mua hàng</h2>
|
|
|
|
|
|
<div className="list-showroom-detail flex flex-wrap justify-between">
|
|
|
|
|
|
<div className="item flex items-center gap-2">
|
|
|
|
|
|
<i className="sprite sprite-camket-detail"></i>
|
|
|
|
|
|
<p>Cam kết giá tốt nhất thị trường.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="item flex items-center gap-2">
|
|
|
|
|
|
<i className="sprite sprite-sanphammoi-detail"></i>
|
|
|
|
|
|
<p>Sản phẩm mới 100%.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="item flex items-center gap-2">
|
|
|
|
|
|
<i className="sprite sprite-1doi1-detail"></i>
|
|
|
|
|
|
<p>Lỗi 1 đổi 1 ngay lập tức.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="item flex items-center gap-2">
|
|
|
|
|
|
<i className="sprite sprite-hotrotragop-detail"></i>
|
|
|
|
|
|
<p>Hỗ trợ trả góp - Thủ tục nhanh gọn.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<BoxBought />
|
2025-12-27 10:03:53 +07:00
|
|
|
|
</>
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|