diff --git a/src/app/product/components/BaseInformation.tsx b/src/app/product/components/BaseInformation.tsx index 000b387..c7f960f 100644 --- a/src/app/product/components/BaseInformation.tsx +++ b/src/app/product/components/BaseInformation.tsx @@ -20,6 +20,14 @@ const BaseInformation: FC = ({ product, stats }) => { const brand = product.brand + const descriptionSource = + product.metaDescription || product.seoDescription || product.description + + const shortDescription = + descriptionSource && descriptionSource.length > 160 + ? `${descriptionSource.slice(0, 160)}...` + : descriptionSource + // محاسبه میانگین امتیاز و تعداد دیدگاه‌ها @@ -90,7 +98,7 @@ const BaseInformation: FC = ({ product, stats }) => { } return ( -
+
{/* بررسی وجود فیلدهای خاص در variant ها */} {(() => { // اگر هیچ فیلد خاصی وجود نداشت، نمایش عمومی @@ -281,6 +289,12 @@ const BaseInformation: FC = ({ product, stats }) => { : null } + {product.specifications.length === 0 && shortDescription && ( +

+ {shortDescription} +

+ )} +
{product.specifications.slice(0, 3).map((spec, index) => (