diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index 612cd0236..69252efc2 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -58,8 +58,31 @@ export default async function ProductPage({ params }: { params: { handle: string if (!product) return notFound(); + const productJsonLd = { + '@context': 'https://schema.org', + '@type': 'Product', + name: product.title, + description: product.description, + image: product.featuredImage.url, + offers: { + '@type': 'AggregateOffer', + availability: product.availableForSale + ? 'https://schema.org/InStock' + : 'https://schema.org/OutOfStock', + priceCurrency: product.priceRange.minVariantPrice.currencyCode, + highPrice: product.priceRange.maxVariantPrice.amount, + lowPrice: product.priceRange.minVariantPrice.amount + } + }; + return (