谷歌片段没有显示我的产品的价格

时间:2012-07-11 06:16:15

标签: php google-api google-analytics-api

`<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>`

我正在使用此代码来获取我的产品的价格和评级。我获得了评级,但价格未显示。但是,Google会在底部显示价格信息但在搜索预览中没有显示/什么我做错了吗?

这是我获得的Google代码段的结果

`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

中的含义

3 个答案:

答案 0 :(得分: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>

答案 1 :(得分: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>

答案 2 :(得分:0)

我使用schema.org比使用data-vocabulary.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>