Microdatas et JSON-LD: existe-t-il un champ ou une variable utilisable "note moyenne" et "nombre de votes"

More
7 years 9 months ago - 7 years 9 months ago #66414 by 012abc
Pour le "voting", Schema.org a prévu schema.org/AggregateRating .

Flexicontent permettant l'évaluation (vote) d'un item, existe-t-il un champ permettant de récupérer :
- la note moyenne seule ("ratingValue")
- et le nombre de votes seul ("ratingCount").

Sinon, comment récupérer la note moyenne seule et le nombre de votes seul pour les inclure dans un JSON-LD ? Avec quelle variable de template ?

Merci pour votre aide.
Last edit: 7 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #66429 by micker
les rating value et count seront dans la version pro de flexicontent avec le systeme de review avancé

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago - 7 years 9 months ago #66433 by 012abc
Ok, c'est noté.

J'ai passé pas mal de temps à faire des tests avec la version 3.1.1 concernant les microdatas. J'avoue être un peu perdu maintenant.

En fait, j'ai du mal à faire la part entre ce que l'on ne peut pas faire (du fait d'une anomalie ?) avec cette version et ce qui résulte d'un défaut de configuration de ma part.

Pour être concret, avec la version 3.1.1 est-il théoriquement possible de produire le code simplifié ci-dessous :

<div itemscope itemtype=" schema.org/Product ">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img itemprop="image" src="kenmore-microwave-17in.jpg" alt='Kenmore 17" Microwave' />
<div itemprop="aggregateRating"
itemscope itemtype=" schema.org/AggregateRating ">
Rated <span itemprop="ratingValue">3.5</span>/5
based on <span itemprop="ratingCount">11</span> user votes
</div>
<div itemprop="offers" itemscope itemtype=" schema.org/Offer ">
<span itemprop="priceCurrency">EUR</span>
<span itemprop="price">1000</span>
<span itemprop="availability" href=" schema.org/InStock ">In stock
</div>
</div>

Merci pour ton aide. :)
Last edit: 7 years 9 months ago by 012abc. Reason: reviewCount -> ratingCount

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago - 7 years 9 months ago #66436 by ggppdk
Hello

in HTML view,
we already output ratingValue and ratingCount (inside aggregateRating):
Code:
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <meta itemprop="ratingValue" content="'.round($percent).'" /> <meta itemprop="bestRating" content="100" /> <meta itemprop="ratingCount" content="'.$rating_count.'" /> </span>

your question is about adding these to the "JSON" view ?

These data are given out in format=JSON too like this:
Code:
[voting] => stdClass Object ( [content_id] => 314 [rating_sum] => 20 [rating_count] => 1 [lastip] => )

rating_count is: ratingCount
(rating_sum *5 / rating_count) is ratingValue


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 7 years 9 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #66441 by micker
je le redis il n'y a pas de bug sur les microdata ... nous utilisons le moteur de joomla pour cela
par contre en autogénération de template il peut y avoir des limitations ....
c'est complexe de gérer tous les cas ................ donc si ton cas est trop particulié adapte ton template FLEXI est fait pour cela

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #66446 by 012abc
Hello ggppdk,

Can I use "'.round($percent).'" , "'.$rating_count.'" or "[rating_sum]" , "[rating_count]" or "($rating_sum *5 / $rating_count)" in my index.php template ?

How can I call the "rating_sum" value and the "rating_count" value in index.php in order to write a JSON-LD ?

I want to write the following code in my pages :

<script type="application/ld+json">
{
"@context": " schema.org ",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"ratingCount": "11"
},
...
}
</script>

Thanks in advance for your help.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.918 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline