订单架构未在 Gmail 上正确显示
Order schema not showing right on Gmail
我正在尝试实现 Order 模式,如下所示:https://developers.google.com/gmail/markup/reference/order
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Test Ltd."
},
"orderNumber": "56d59b633427b",
"orderStatus": "http://schema.org/PaymentComplete",
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Test Products"
},
"price": "41.09",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
},
"url": "http://project1.local/account/tickets",
"potentialAction": {
"@type": "ViewAction",
"target": "http://project1.local/account/tickets"
}
}}
</script>
问题是电子邮件显示为普通电子邮件。我究竟做错了什么?
谢谢!
PS:代码在 https://developers.google.com/structured-data/testing-tool/
上验证
尝试使用我在下面发布的 JSON。无法识别 PaymentComplete,因此我使用了 OrderDelivered。您可以在此处找到更多信息:
https://schema.org/OrderStatus
我注意到你的 URL 中有 "tickets" 这个词,你打算使用订单模式来确认机票吗?我建议使用 event reservation instead. Using this will integrate with Google Now cards 并将事件输入到用户的日历中。您仍然可以使用 url 或 modifyReservationurl 生成操作按钮。
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Test Ltd."
},
"orderNumber": "56d59b633427b",
"orderStatus": "http://schema.org/OrderDelivered",
"priceCurrency": "USD",
"price": "41.00",
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Test Products"
},
"price": "41.00",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
}
},
"url": "https://project1.local/account/tickets",
"potentialAction": {
"@type": "ViewAction",
"target": "https://project1.local/account/tickets"
}
}
</script>
我正在尝试实现 Order 模式,如下所示:https://developers.google.com/gmail/markup/reference/order
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Test Ltd."
},
"orderNumber": "56d59b633427b",
"orderStatus": "http://schema.org/PaymentComplete",
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Test Products"
},
"price": "41.09",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
},
"url": "http://project1.local/account/tickets",
"potentialAction": {
"@type": "ViewAction",
"target": "http://project1.local/account/tickets"
}
}}
</script>
问题是电子邮件显示为普通电子邮件。我究竟做错了什么?
谢谢!
PS:代码在 https://developers.google.com/structured-data/testing-tool/
上验证尝试使用我在下面发布的 JSON。无法识别 PaymentComplete,因此我使用了 OrderDelivered。您可以在此处找到更多信息:
https://schema.org/OrderStatus
我注意到你的 URL 中有 "tickets" 这个词,你打算使用订单模式来确认机票吗?我建议使用 event reservation instead. Using this will integrate with Google Now cards 并将事件输入到用户的日历中。您仍然可以使用 url 或 modifyReservationurl 生成操作按钮。
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Order",
"merchant": {
"@type": "Organization",
"name": "Test Ltd."
},
"orderNumber": "56d59b633427b",
"orderStatus": "http://schema.org/OrderDelivered",
"priceCurrency": "USD",
"price": "41.00",
"acceptedOffer": {
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Test Products"
},
"price": "41.00",
"priceCurrency": "USD",
"eligibleQuantity": {
"@type": "QuantitativeValue",
"value": "1"
}
},
"url": "https://project1.local/account/tickets",
"potentialAction": {
"@type": "ViewAction",
"target": "https://project1.local/account/tickets"
}
}
</script>