diff --git a/vtex/loaders/legacy/productDetailsPage.ts b/vtex/loaders/legacy/productDetailsPage.ts index 73941baa2..e3d3ea9bc 100644 --- a/vtex/loaders/legacy/productDetailsPage.ts +++ b/vtex/loaders/legacy/productDetailsPage.ts @@ -101,7 +101,9 @@ async function loader( : page.product, seo: { title: product.productTitle || product.productName, - description: product.metaTagDescription, + description: props.advancedConfigs?.preferDescription + ? product.description + : product.metaTagDescription, canonical: new URL(`/${product.linkText}/p`, url.origin).href, noIndexing: props.indexingSkus ? false : !!skuId, }, diff --git a/vtex/utils/types.ts b/vtex/utils/types.ts index c87b84357..89b86ec21 100644 --- a/vtex/utils/types.ts +++ b/vtex/utils/types.ts @@ -1520,6 +1520,9 @@ export interface Promotion { export interface AdvancedLoaderConfig { /** @description Specifies an array of attribute names from the original object to be directly included in the transformed object. */ includeOriginalAttributes: string[]; + + /** @description Allow this field if you prefer to use description instead of metaTagDescription */ + preferDescription?: boolean; } export type Maybe = T | null | undefined;