使用Microdata能否在Order Markup中展示多个商品?
Can Microdata Display Multiple Items in Gmail Order Markup?
Absolutely! You can definitely display multiple purchased items in Gmail order markup using Microdata—even though Google’s official Gmail markup documentation only provides a JSON-LD example for this scenario. The Microdata implementation aligns with the schema.org Order schema that Gmail fully supports.
Working Microdata Example for Multiple Order Items
Here’s a complete, valid example that includes an order with multiple products, formatted for Gmail:
<div itemscope itemtype="http://schema.org/Order"> <!-- Core order details --> <meta itemprop="orderNumber" content="ORD-78901"> <meta itemprop="priceCurrency" content="EUR"> <meta itemprop="totalPrice" content="119.97"> <!-- First ordered item --> <div itemprop="orderedItem" itemscope itemtype="http://schema.org/OrderItem"> <div itemprop="orderedItem" itemscope itemtype="http://schema.org/Product"> <meta itemprop="name" content="Bluetooth Speaker"> <meta itemprop="sku" content="SP-3003"> </div> <meta itemprop="quantity" content="1"> <meta itemprop="price" content="59.99"> </div> <!-- Second ordered item --> <div itemprop="orderedItem" itemscope itemtype="http://schema.org/OrderItem"> <div itemprop="orderedItem" itemscope itemtype="http://schema.org/Product"> <meta itemprop="name" content="Portable Power Bank"> <meta itemprop="sku" content="PB-4004"> </div> <meta itemprop="quantity" content="2"> <meta itemprop="price" content="29.99"> </div> </div>
Key Details to Keep in Mind:
- Each product gets its own
<div>withitemprop="orderedItem"anditemtype="http://schema.org/OrderItem"—this tells Gmail to treat each as a separate line item in the order. - Nest a
Producttype inside eachOrderItemto define the item’s name, SKU, or other relevant details. - Don’t forget required order-level properties like
orderNumber,totalPrice, andpriceCurrency—these are critical for Gmail to recognize and render the order summary correctly. - Gmail will parse all
orderedItementries and display them in a structured order table within the email interface.
内容的提问来源于stack exchange,提问作者Stefano Pistillo
相关产品推荐
相关产品推荐

