import Image from "next/image"; import Link from "next/link"; import { PageShell } from "../../components"; import { CUSTOMER_URL, getStoreItem, getStoreItems, getTenant } from "../../meshkee"; import { pageMetadata, productCanonicalPath } from "../../seo"; import StoreActions from "../../StoreActions"; export async function generateMetadata({ params }) { const { id } = await params; const item = await getStoreItem(id); const description = item.description.replace(/<[^>]*>/g, "") || `خرید ${item.title} از آریا شبکه پیشرو همراه با مشاوره تخصصی و اعلام موجودی.`; return pageMetadata({ title: item.title, description: description.slice(0, 160), path: productCanonicalPath(item), image: item.image }); } export default async function StoreDetailPage({ params }) { const { id } = await params; const [{ id: businessId }, item, related] = await Promise.all([ getTenant(), getStoreItem(id), getStoreItems({ pageSize: 4 }) ]); const similar = related.items.filter((relatedItem) => relatedItem.id !== item.id).slice(0, 4); const specs = Array.isArray(item.technicalValues) ? item.technicalValues : []; return (
{item.title}
{item.images.slice(0, 4).map((image) => ( ))}
{item.category}

{item.title}

{item.description.replace(/<[^>]*>/g, "") || "برای دریافت مشاوره تخصصی و اعلام موجودی با کارشناسان فروش تماس بگیرید."}

{item.price ? `${item.price} ${item.currency}` : "تماس با فروشگاه"}
توضیحات
توضیحات این محصول از API فروشگاه یا محتوای جایگزین نمایش داده می شود.

" }} />
اطلاعات فنی {specs.length ? (
{specs.map((spec, index) => (

{spec.label || spec.fieldName || spec.fieldId || `ویژگی ${index + 1}`} {spec.value || spec.textValue || spec.optionLabel || spec.optionId || "-"}

))}
) :

اطلاعات فنی برای این محصول ثبت نشده است.

}
نظرات

برای ثبت نظر درباره این محصول وارد حساب کاربری شوید.

ورود به حساب کاربری
RELATED

محصولات مشابه

{similar.map((relatedItem) => (
{relatedItem.title}
{relatedItem.category}

{relatedItem.title}

{relatedItem.price ? `${relatedItem.price} ${relatedItem.currency}` : "تماس با فروشگاه"} ))}
); }