如何为Google Schema Product输入多种颜色?

问题描述 投票:0回答:1

我商店中的某些产品具有多种与之相关的颜色。 Google是否会在架构中考虑多种颜色,这是有效的方法吗?

<div itemscope itemtype="http://schema.org/Product">
Other items....
    <span itemprop="color"> Color 1 </span>
    <span itemprop="color"> Color 2 </span>
    <span itemprop="color"> Color 3 </span>
</div>

下面是Google结构化数据测试工具的屏幕截图enter image description here

html schema metadata meta schema.org
1个回答
0
投票

首先,color预期类型是文本。

其语义:

<span itemprop="color">Blue</span>
<span itemprop="color">Orange</span>

相同与此数据:

<span itemprop="color">Blue, Orange</span>

附加选项-产品变体(两个模式)

通常,将其写下来的最困难的方式是通过Products variants模式。但是很少有人会觉得这个想法有用。

为什么?大多数站点使用一个并且只有一个产品(=一个模式)+“颜色选择器”作为简单的表单选择菜单(通过JS更改图像)。没有人使用两种单独的产品。

无论如何,这是来自Google的复制粘贴示例:https://support.google.com/merchants/answer/6386198?hl=en

<!-- product 1 -->
<span itemscope itemtype="http://schema.org/Product">
    <meta itemprop="sku" content="EXAMPLE-1337-micro-silver">
    <meta itemprop="gtin14" content="12345678901234">
    <meta itemprop="mpn" content="925873">
    <meta itemprop="image" content="http://fake.example.com/test_executive.jpg"/>
    <meta itemprop="name" content="Example Test">
    <meta itemprop="description" content="This is just a boring example">
    <meta itemprop="brand" content="EXAMPLE">
    <meta itemprop="color" content="Silver">
    <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <meta itemprop="priceCurrency" content="USD"/>
        <meta itemprop="price" content="119.99">
        <link itemprop="itemCondition" href="http://schema.org/UsedCondition"/>
        <link itemprop="availability" href="http://schema.org/InStock"/>
    </span>
</span>
<!-- product 2 -->
<span itemscope itemtype="http://schema.org/Product">
    <meta itemprop="sku" content="EXAMPLE-1337-micro-gold">
    <meta itemprop="gtin14" content="12345678901235">
    <meta itemprop="mpn" content="925873">
    <meta itemprop="image" content="http://fake.example.com/test_executive.jpg"/>
    <meta itemprop="name" content="Example Test">
    <meta itemprop="description" content="This is just a boring example">
    <meta itemprop="brand" content="EXAMPLE">
    <meta itemprop="color" content="Gold">
    <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <meta itemprop="priceCurrency" content="USD"/>
        <meta itemprop="price" content="3119.99">
        <link itemprop="itemCondition" href="http://schema.org/UsedCondition"/>
        <link itemprop="availability" href="http://schema.org/InStock"/>
    </span>
</span>
© www.soinside.com 2019 - 2024. All rights reserved.