Magento 2.2.5:"The itemprop attribute was specified, but the element is not a property of any item"
Magento 2.2.5: "The itemprop attribute was specified, but the element is not a property of any item"
有人知道我需要添加什么来解决以下代码的问题吗?
<div class="product-info-main">
<div class="product attribute overview">
<div class="value" itemprop="description">
KISS KISS BANG BANG
</div>
</div>
<div class="product-info-price">
<div class="page-title-wrapper product">
<h1 class="page-title"><span class="base" data-ui-id="page-title-wrapper" itemprop="name">FAUX FUR TEDDY COAT</span></h1>
</div>
<div class="price-box price-final_price" data-price-box="product-id-9586" data-product-id="9586" data-role="priceBox">
<span class="normal-price"><span class="price-container price-final_price tax weee" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><span class="price-wrapper" data-price-amount="350" data-price-type="finalPrice" id="product-price-9586"><span class="price">€350.00</span></span></span></span>
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</div>
</div>
</div>
以下代码段出现错误:
<div class="value" itemprop="description">KISS K...
<span class="base" data-ui-id="page-title-wrapper" itemprop="name">...
<span class="price-container price-final_price tax weee" itemprop="offers" itemscope itemtype="http://schema.org/Offer">...
<meta itemprop="price" content="350" />...
<meta itemprop="priceCurrency" content="EUR" />...
您的价格和价格货币不在报价范围内。工作代码可能是:
<div class="product-info-main">
<div class="product attribute overview">
<div class="value" itemprop="description">
KISS KISS BANG BANG
</div>
</div>
<div class="product-info-price">
<div class="page-title-wrapper product">
<h1 class="page-title"><span class="base" data-ui-id="page-title-wrapper" itemprop="name">FAUX FUR TEDDY COAT</span></h1>
</div>
<div class="price-box price-final_price" data-price-box="product-id-9586" data-product-id="9586" data-role="priceBox">
<span class="normal-price"><span class="price-container price-final_price tax weee" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><span class="price-wrapper" data-price-amount="350" data-price-type="finalPrice" id="product-price-9586"><span class="price">€350.00</span>
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</span></span></span>
</div>
</div>
</div>
删除与 Microdata 无关的所有内容,您有:
<div itemprop="description">KISS KISS BANG BANG</div>
<span itemprop="name">FAUX FUR TEDDY COAT</span>
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer"></span>
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
除非您的代码段中没有显示父微数据项(具有 itemscope
并且可能 itemtype
),否则 itemprop
属性中的 none 与项,无效。
我假设你的数据是关于 Product
,所以它应该是这样的:
<article itemscope itemtype="http://schema.org/Product">
<p itemprop="description">KISS KISS BANG BANG</p>
<h2 itemprop="name">FAUX FUR TEDDY COAT</h2>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</div>
</article>
有人知道我需要添加什么来解决以下代码的问题吗?
<div class="product-info-main">
<div class="product attribute overview">
<div class="value" itemprop="description">
KISS KISS BANG BANG
</div>
</div>
<div class="product-info-price">
<div class="page-title-wrapper product">
<h1 class="page-title"><span class="base" data-ui-id="page-title-wrapper" itemprop="name">FAUX FUR TEDDY COAT</span></h1>
</div>
<div class="price-box price-final_price" data-price-box="product-id-9586" data-product-id="9586" data-role="priceBox">
<span class="normal-price"><span class="price-container price-final_price tax weee" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><span class="price-wrapper" data-price-amount="350" data-price-type="finalPrice" id="product-price-9586"><span class="price">€350.00</span></span></span></span>
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</div>
</div>
</div>
以下代码段出现错误:
<div class="value" itemprop="description">KISS K...
<span class="base" data-ui-id="page-title-wrapper" itemprop="name">...
<span class="price-container price-final_price tax weee" itemprop="offers" itemscope itemtype="http://schema.org/Offer">...
<meta itemprop="price" content="350" />...
<meta itemprop="priceCurrency" content="EUR" />...
您的价格和价格货币不在报价范围内。工作代码可能是:
<div class="product-info-main">
<div class="product attribute overview">
<div class="value" itemprop="description">
KISS KISS BANG BANG
</div>
</div>
<div class="product-info-price">
<div class="page-title-wrapper product">
<h1 class="page-title"><span class="base" data-ui-id="page-title-wrapper" itemprop="name">FAUX FUR TEDDY COAT</span></h1>
</div>
<div class="price-box price-final_price" data-price-box="product-id-9586" data-product-id="9586" data-role="priceBox">
<span class="normal-price"><span class="price-container price-final_price tax weee" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><span class="price-wrapper" data-price-amount="350" data-price-type="finalPrice" id="product-price-9586"><span class="price">€350.00</span>
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</span></span></span>
</div>
</div>
</div>
删除与 Microdata 无关的所有内容,您有:
<div itemprop="description">KISS KISS BANG BANG</div>
<span itemprop="name">FAUX FUR TEDDY COAT</span>
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer"></span>
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
除非您的代码段中没有显示父微数据项(具有 itemscope
并且可能 itemtype
),否则 itemprop
属性中的 none 与项,无效。
我假设你的数据是关于 Product
,所以它应该是这样的:
<article itemscope itemtype="http://schema.org/Product">
<p itemprop="description">KISS KISS BANG BANG</p>
<h2 itemprop="name">FAUX FUR TEDDY COAT</h2>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta content="350" itemprop="price">
<meta content="EUR" itemprop="priceCurrency">
</div>
</article>