fix: add missing offers field into product schema

This commit is contained in:
abhu-A-J 2023-05-15 13:16:53 +05:30
parent b3c80b53b2
commit c23a39bb53

View File

@ -63,7 +63,16 @@ export default async function ProductPage({ params }: { params: { handle: string
'@type': 'Product',
name: product.title,
description: product.description,
image: product.featuredImage.url
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 (