diff --git a/templates/_partials/microdata/product-jsonld.tpl b/templates/_partials/microdata/product-jsonld.tpl index 113ebf078..33c7a60ee 100644 --- a/templates/_partials/microdata/product-jsonld.tpl +++ b/templates/_partials/microdata/product-jsonld.tpl @@ -17,6 +17,26 @@ "@type": "Brand", "name": "{if $product_manufacturer->name}{$product_manufacturer->name|escape:'html':'UTF-8'}{else}{$shop.name}{/if}" },{/if} + {if !empty($product.productComments.comments)} + "review": [ + {foreach from=$product.productComments.comments item=comment} + { + "@type": "Review", + "reviewRating": { + "@type": "Rating", + "ratingValue": "{$comment.grade}", + "datePublished": "{$comment.date_add}" + }, + "name": "{$comment.title}", + "author": { + "@type": "Person", + "name": "{$comment.customer_name}" + }, + "reviewBody": "{$comment.content}" + } + {/foreach} + ], + {/if} {if isset($nbComments) && $nbComments && $ratings.avg}"aggregateRating": { "@type": "AggregateRating", "ratingValue": "{$ratings.avg|round:1|escape:'html':'UTF-8'}",