From 62895f1e8043fc5179f5e7bd1925d673ff5d0ecf Mon Sep 17 00:00:00 2001 From: gimenes Date: Tue, 27 Jun 2023 22:16:46 -0300 Subject: [PATCH] set variant url as product url structured data --- components/seo/Metatags.tsx | 8 +++++++- components/seo/SEOPDP.tsx | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/seo/Metatags.tsx b/components/seo/Metatags.tsx index ba42db5e..1f22e1bc 100644 --- a/components/seo/Metatags.tsx +++ b/components/seo/Metatags.tsx @@ -49,7 +49,13 @@ function Metatags(props: Props) { {context?.["@type"] === "ProductDetailsPage" && ( <> - + )} diff --git a/components/seo/SEOPDP.tsx b/components/seo/SEOPDP.tsx index 3ea8e2b3..3fb77e47 100644 --- a/components/seo/SEOPDP.tsx +++ b/components/seo/SEOPDP.tsx @@ -40,6 +40,7 @@ const SeoPDP = (props: Props) => { ...props.page, product: { ...product, + url: product.isVariantOf?.url, category: lastCategory, ...(props.structuredData?.useDataFromSEO && { name: removeHTMLTags(props.page?.seo?.title),