Jump to content

Erreur google console manque itemReviewed


Recommended Posts

Bonjour

Presta 1.6.1 et module commentaire prestashop 3.6.1

Apres avoir modifié et validé le breadcrumb suite a la modif google schema.org

Je recois une erreur manque itemreviewed   la modif du productcomments.tpl repond t elle a cette erreur avec les modifs apportées ? 

<div id="idTab5">
    <div id="product_comments_block_tab" itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
            {if $comments}
            <span class="hidden" itemprop="itemReviewed">{$productName}</span>
        <span class="hidden" itemprop="reviewCount">{$comments|@count}</span>
        <span class="hidden" itemprop="ratingValue">{$averageTotal|round}</span>
            {foreach from=$comments item=comment}
                {if $comment.content}

Merci d'avance

Edited by docmusicstation (see edit history)
Link to comment
Share on other sites

  • 4 years later...
  • 6 months later...
On 12/21/2024 at 11:11 PM, Bertrand1779 said:

Bonjour,

Désolé pour le retard, mais j'ai trouvé la solution pour résoudre le problème pour "itemReviewed" sur prestashop 1.7.7 et plus.

Mais comme toujours, je vous laisse juge de mais dire, si vous êtes convaincu je partage gratuitement ma solution.

A vérifier sur https://monparfumpascher.fr

Cordialement

Bertand

Bonjour pouvez vous partager la solution?

Link to comment
Share on other sites

Bonjour à tous

Champ "itemReviewed" manquant, voici enfin la solution que je partage avec vous.

Il faut ajouter un "hook".

Ouvrir le fichier : /themes/VOTRE THEMES/templates/_partials/microdata/product
jsonld.tpl

Ajoutez {hook h='displayMicrodataAggregateRating' id_product=$product.id} à la ligne 59. Juste avant "{if $hasAggregateRating},"

Ce qui donne :

{hook h='displayMicrodataAggregateRating' id_product=$product.id}
    {if $hasAggregateRating},
      "aggregateRating" : {
        "@type" : "AggregateRating",
        "ratingValue" : "{$ratingValue|round:1}",
        "reviewCount" : "{$ratingReviewCount}"
      }
    {/if}

Chez moi ça fonctionne parfaitement, Google a accepté la validation de mes modifications, plus de message d'erreur. (à tester bien sûr)

En espérant que ça pourra vous aider.

Sincères salutations
Bertrand

Link to comment
Share on other sites

It looks like you're on the right track by adding itemReviewed inside the AggregateRating block, but for full schema.org compliance, itemReviewed is typically expected as part of a Review or Product scope. You might need to structure it within a broader Product schema to avoid the warning.

Link to comment
Share on other sites

Il y a 2 heures, DG Dreams a dit :

Il semble que vous soyez sur la bonne voie en ajoutant itemReviewed à l'intérieur du bloc AggregateRating, mais pour une conformité totale avec schema.org, itemReviewed est typiquement attendu comme faisant partie de l'étendue d'un Review ou d'un Product. Il se peut que vous deviez le structurer dans un schéma Product plus large pour éviter l'avertissement.

Merci de respecter la langue du forum.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...