0
`<div itemscope itemtype="http://data-vocabulary.org/product">
<div itemprop="name">
naren
</div>
<div itemprop="review" itemscope itemtype="http://data-vocabulary.org/review">
<span itemprop="rating">5</span>
</div>
<div itemprop="offers" itemscope itemtype="http://data-vocabulary.org/offer">
<span itemprop="price"> USD 500</span>
</div>

</div>`

我正在使用此代码来获取我的产品的价格和评级。我正在获取评级但价格未显示。但谷歌确实在底部显示价格信息但在搜索预览中没有显示/我在做什么错误的?

这是我得到的谷歌片段的结果

`Item
Type: http://data-vocabulary.org/product
name = naren
review = Item( 1 )
offers = Item( 2 )
Item 1
Type: http://data-vocabulary.org/review
rating = 5
Item 2
Type: http://data-vocabulary.org/offer
price = USD 500 `

请尝试测试此代码以了解我在http://www.google.com/webmasters/tools/richsnippets中的意思

4

3 回答 3

1

价格和货币必须分开,将您的代码替换为:

<div itemscope itemtype="http://data-vocabulary.org/product">
    <div itemprop="name">naren</div>
    <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/review">
        <span itemprop="rating">5</span>
    </div>
    <div itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
        <meta itemprop="currency" content="USD" />
        USD <span itemprop="price">500</span>
    </div>
</div>
于 2012-07-11T06:34:28.333 回答
0

为什么不是这个?

<div itemscope itemtype="http://data-vocabulary.org/product">
    <div itemprop="name">naren</div>
    <div itemprop="review" itemscope itemtype="http://data-vocabulary.org/review">
        <span itemprop="rating">5</span>
    </div>
    <div itemprop="offerDetails" itemscope itemtype="http://data-vocabulary.org/Offer">
        <span itemprop="currency">USD</span>
        <span itemprop="price">500</span>
    </div>
</div>
于 2013-02-06T13:35:04.923 回答
0

与 data-vocabulary.org 相比,schema.org 的运气更好。

试试这个:

<div itemscope itemtype="http://schema.org/product">
<div itemprop="name">
naren
</div>
<div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/offer">
<link itemprop="availability" href="http://schema.org/InStock">
<meta itemprop="priceCurrency" content="usd">
<span itemprop="price">$500</span>
</div>

</div>
于 2013-07-22T01:53:55.560 回答