+
+ {item.product_info.price !== '0'
+ ? `${formatCurrency(item.product_info.price)}đ`
+ : 'Liên hệ'}
+
+ {item.product_info.marketPrice > '0' && (
+ <>
+
+ {formatCurrency(item.product_info.marketPrice)}₫
+
+
+ Tiết kiệm
+ {(() => {
+ return formatCurrency(
+ Number(item.product_info.marketPrice) - Number(item.product_info.price),
+ );
+ })()}
+ đ
+
+ >
+ )}
)}
>
diff --git a/src/components/product/ProductDetail/BoxInfoRight/TimeDeal/index.tsx b/src/components/product/ProductDetail/BoxInfoRight/TimeDeal/index.tsx
deleted file mode 100644
index e69de29..0000000
diff --git a/src/components/product/ProductDetail/BoxInfoRight/index.tsx b/src/components/product/ProductDetail/BoxInfoRight/index.tsx
index 7eedc6f..52df2d5 100644
--- a/src/components/product/ProductDetail/BoxInfoRight/index.tsx
+++ b/src/components/product/ProductDetail/BoxInfoRight/index.tsx
@@ -2,11 +2,14 @@ import type { ProductDetailData } from '@/types';
import Link from 'next/link';
import { BoxPrice } from './BoxPrice';
+import { BoxBought } from './BoxBought';
export const BoxInfoRight = (item: ProductDetailData) => {
return (
<>
-
@@ -125,6 +128,31 @@ export const BoxInfoRight = (item: ProductDetailData) => {
>
)}
+
+ {/* yên tâm mua hàng */}
+
+
Yên tâm mua hàng
+
+
+
+
Cam kết giá tốt nhất thị trường.
+
+
+
+
+
Lỗi 1 đổi 1 ngay lập tức.
+
+
+
+
Hỗ trợ trả góp - Thủ tục nhanh gọn.
+
+
+
+
+
>
);
};
diff --git a/src/components/product/ProductDetail/index.tsx b/src/components/product/ProductDetail/index.tsx
index 2deee7b..64da303 100644
--- a/src/components/product/ProductDetail/index.tsx
+++ b/src/components/product/ProductDetail/index.tsx
@@ -4,9 +4,9 @@ import Link from 'next/link';
import type { ProductDetailData } from '@/types';
import { productDetailData } from '@/data/product/detail';
import { findProductDetailBySlug } from '@/lib/product/productdetail';
-import { ErrorLink } from '@components/common/error';
+import { ErrorLink } from '@/components/Common/error';
-import { Breadcrumb } from '@components/common/Breadcrumb';
+import { Breadcrumb } from '@/components/Common/Breadcrumb';
import { ImageProduct } from './ImageProduct';
import { ProductSummary } from './ProductSummary';
import { ComboSetBox } from './ComboSet';
diff --git a/src/data/product/detail/index.ts b/src/data/product/detail/index.ts
index 7627f72..c56ffd1 100644
--- a/src/data/product/detail/index.ts
+++ b/src/data/product/detail/index.ts
@@ -320,7 +320,7 @@ export const productDetailData = [
max_purchase: '0',
remain_quantity: '1',
from_time: '1766106000',
- to_time: '1766716200',
+ to_time: '1766975400',
type: 'deal',
type_id: '565',
},
@@ -388,6 +388,8 @@ export const productDetailData = [
from_time: '1766106000',
to_time: '1766716200',
is_started: '1',
+ sale_order: 2,
+ sale_quantity: 2,
},
],
pricing_traces: [
@@ -1351,9 +1353,9 @@ export const productDetailData = [
min_purchase: '1',
max_purchase: '1',
remain_quantity: '1',
- from_time: '0',
- to_time: '0',
- type: '',
+ from_time: '19-12-2025, 8:00 am',
+ to_time: '29-12-2025, 9:30 am',
+ type: 'deal',
},
categoryInfo: [
{
diff --git a/src/lib/resolvePageType.ts b/src/lib/resolvePageType.ts
index ac0a8fc..ee3cacd 100644
--- a/src/lib/resolvePageType.ts
+++ b/src/lib/resolvePageType.ts
@@ -8,7 +8,7 @@ export function resolvePageType(slug: string) {
}
// kiểm tra sản phẩm
if (productDetailData.some((c) => c.product_info.productUrl == slug)) {
- return 'product';
+ return 'product-detail';
}
return '404';
}
diff --git a/src/styles/globals.css b/src/styles/globals.css
index ef7daaf..73b4ce3 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -2236,6 +2236,7 @@ textarea::placeholder {
justify-content: center;
font-weight: 600;
}
+
.btn-product,
.page-hompage .box-product-deal .btn-deal {
color: #105fbd;
@@ -3284,15 +3285,22 @@ textarea::placeholder {
border-top: 64px solid transparent;
border-right: 30px solid #fff;
}
-.page-product-detail .box-content-product-detail .box-flash-sale .item-time b {
- border-radius: 5px;
+.page-product-detail .box-content-product-detail .box-flash-sale .global-time-deal p {
background: #001644;
- padding: 5px;
- font-size: 16px;
color: #fff;
- margin-bottom: 4px;
- display: block;
+ border-radius: 3px;
+ justify-content: center;
+ align-items: center;
+ width: 30px;
+ height: 28px;
+ font-size: 16px;
+ font-weight: 600;
+ display: flex;
}
+.page-product-detail .global-time-deal .flex.items-center.gap-2 {
+ gap: calc(var(--spacing) * 1);
+}
+
.page-product-detail .box-content-product-detail .box-flash-sale .box-middle span {
margin-top: 4px;
}
@@ -6016,3 +6024,30 @@ textarea::placeholder {
background-size: 100% 100%;
z-index: 1;
}
+
+.pro-customer-bought {
+ position: relative;
+ padding-left: 30px;
+ margin: 8px 0;
+}
+.pro-customer-bought .pcb-icon {
+ position: absolute;
+ top: 4px;
+ left: 0;
+}
+.pro-customer-bought .pcb-slider {
+ font-size: 14px;
+ line-height: 24px;
+}
+.pro-customer-bought .pcb-slider .swiper-slide p:first-child {
+ font-size: 15px;
+}
+
+@media (max-width: 768px) {
+ .pro-customer-bought .pcb-slider {
+ font-size: 13px;
+ }
+ .pro-customer-bought .pcb-slider .swiper-slide p:first-child {
+ font-size: 14px;
+ }
+}
diff --git a/src/types/product/detail/index.ts b/src/types/product/detail/index.ts
index 256a4a0..4105278 100644
--- a/src/types/product/detail/index.ts
+++ b/src/types/product/detail/index.ts
@@ -88,6 +88,8 @@ interface Deal {
from_time: string;
to_time: string;
is_started: string;
+ sale_order: number;
+ sale_quantity: number;
}
// Pricing Trace
diff --git a/tsconfig.json b/tsconfig.json
index e8e3e3e..a5ff0c3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -23,7 +23,7 @@
"@components/*": ["./src/components/*"],
"@types/*": ["./src/types/*"],
"@styles/*": ["./src/styles/*"],
- "@Common/*": ["./src/components/Common/*"]
+ "@Common/*": ["src/components/Common/*"]
}
},
"include": [