0

我想使用 mikroformats 将片段添加到我的代码中。我成功地评价了项目名称和可用性,但是,无论我尝试什么价格都不会显示。这是代码;

<ul itemprop="offerDetails" itemscope="" itemtype="http://data-vocabulary.org/Offer" class="uk-subnav uk-subnav-line">
<meta itemprop="priceCurrency" content="TRY"> <li itemprop="price" class="element element-text">
<strong>Fiyatı: </strong>8,00 ₺
</li>
<li class="element element-select">
<strong><span itemprop="availability" content="in_stock">Porsiyon</span>: </strong>1
</li>
<li class="element element-relatedcategories">
<strong>Köken: </strong><a href="/menü/category/türkiye">Türk Mutfağı</a>
</li>
</ul>

我也试过了,但也没有用;

<ul itemprop="offerDetails" itemscope="" itemtype="http://data-vocabulary.org/Offer" class="uk-subnav uk-subnav-line">
<meta itemprop="priceCurrency" content="TRY"> 
<li class="element element-text">
**<strong>Fiyatı: </strong> <span itemprop="price">8,00</span>** ₺
</li>
<li class="element element-select">
<strong><span itemprop="availability" content="in_stock">Porsiyon</span>: </strong>1
</li>
<li class="element element-relatedcategories">
<strong>Köken: </strong><a href="/menü/category/türkiye">Türk Mutfağı</a>
</li>
</ul>

我想我错过了一些东西,但我看不到。这是与评级一起使用的完整代码;

<div itemscope="" itemtype="http://data-vocabulary.org/Product">
<h1 itemprop="name" class="uk-h1"> Tavuklu Salata </h1>
</div>
<div class="uk-margin element element-rating">
<div id="3194f2e2-b29e-4a6b-8555-17c58b42ed6c-547708aa747b1" class="yoo-zoo rating">
<div class="rating-container star5">
<div class="previous-rating" style="width: 100%;"></div>
<div class="current-rating">
<div class="stars star5" title="5  /  5"></div>
<div class="stars star4" title="4  /  5"></div>
<div class="stars star3" title="3  /  5"></div>
<div class="stars star2" title="2  /  5"></div>
<div class="stars star1" title="1  /  5"></div>
</div>
</div>
<div class="vote-message">
5.0/<strong>5</strong> derecelendirme (1 oy) </div>
<div itemscope="" itemtype="http://data-vocabulary.org/Review-aggregate">
<meta itemprop="itemreviewed" content="Tavuklu Salata">
<div itemprop="rating" itemscope="" itemtype="http://data-vocabulary.org/Rating">
<meta itemprop="average" content="5.0">
<meta itemprop="best" content="5">
</div>
<meta itemprop="votes" content="1">
</div>
</div>
<script type="text/javascript">
        jQuery(function($) {
            $('#3194f2e2-b29e-4a6b-8555-17c58b42ed6c-547708aa747b1').ElementRating({ url: '/salatalar?task=callelement&format=raw&item_id=22&element=3194f2e2-b29e-4a6b-8555-17c58b42ed6c' });
        });
    </script>
</div>
<ul itemprop="offerDetails" itemscope="" itemtype="http://data-vocabulary.org/Offer" class="uk-subnav uk-subnav-line">
<meta itemprop="priceCurrency" content="TRY">
<li itemprop="price" class="element element-text">
<strong>Fiyatı: </strong>8,00 ₺&lt;/li>
<li class="element element-select">
<strong><span itemprop="availability" content="in_stock">Porsiyon: </strong>1</li>
<li class="element element-relatedcategories">
<strong>Köken: </strong><a href="/menü/category/türkiye">Türk Mutfağı</a></li>
</ul>
4

1 回答 1

0

问题解决了。事实证明,我必须将货币类型放在价格本身之前;

<strong>Fiyatı: </strong>**TL** 8,00 ₺&lt;/li>
于 2014-11-27T12:45:07.680 回答