Menu
實體會定義屬性,例如選單項目、優惠和選單部分。
定義 Menu
實體時,請使用 Menu
類型。
使用 MenuSection
將 MenuItem
物件分門別類。對於有多種菜單的餐廳來說,這種做法非常實用。舉例來說,餐廳可能會提供早餐、午餐和晚餐的不同菜單。每個選單都可以新增為個別的 MenuSection
。
每個菜單項目都可以包含說明、圖片、附加項目和營養資訊。優惠可用於設定餐點價格、定義餐點供應時間,以及定義特價生效時間。Menu
實體中的資料會隨著每次資料動態饋給上傳而變更及更新。
選單實體範例
以下範例定義了基本 Menu
實體,其中包含兩個不同的選單部分。
{
"@type":"Menu",
"@id":"menu_1"
}
{
"@type":"MenuSection",
"@id":"menu_1_pizza",
"menuId":{
"@id":"menu_1",
"displayOrder":1
},
"name":"Pizza"
}
{
"@type":"MenuItem",
"@id":"menu_1_pizza_cheese",
"name":"Cheese Pizza - Large",
"description":"Four cheese pizza with marinara sauce.",
"parentMenuSectionId":{
"@id":"menu_1_pizza",
"displayOrder":1
}
}
{
"@type":"MenuItemOffer",
"@id":"menu_1_pizza_cheese_offer",
"sku":"6680306",
"menuItemId":"menu_1_pizza_cheese",
"price":20.5,
"priceCurrency":"USD"
}
{
"@type":"MenuItem",
"@id":"menu_1_pizza_pesto",
"name":"Pesto Primavera Pizza - Large",
"description":"Pesto with pancetta and freshly sliced tomatoes.",
"parentMenuSectionId":{
"@id":"menu_1_pizza",
"displayOrder":2
}
}
{
"@type":"MenuItemOffer",
"@id":"menu_1_pizza_pesto_offer",
"sku":"9825028",
"menuItemId":"menu_1_pizza_pesto",
"price":23.5,
"priceCurrency":"USD"
}
{
"@type":"MenuSection",
"@id":"menu_1_pasta",
"menuId":{
"@id":"menu_1",
"displayOrder":2
},
"name":"Pasta"
}
{
"@type":"MenuItem",
"@id":"menu_1_pasta_spag",
"name":"Spaghetti",
"description":"With meat sauce and meatballs.",
"parentMenuSectionId":{
"@id":"menu_1_pasta",
"displayOrder":1
}
}
{
"@type":"MenuItemOffer",
"@id":"menu_1_pasta_spag_offer",
"sku":"6680300",
"menuItemId":"menu_1_pasta_spag",
"price":15.75,
"priceCurrency":"USD"
}
{
"@type":"MenuItem",
"@id":"menu_1_pasta_spin_ling",
"name":"Spinach Linguini",
"description":"Grilled chicken breast, shiitake mushrooms, fresh Roma tomato,
garlic, and fresh herbs.",
"parentMenuSectionId":{
"@id":"menu_1_pasta",
"displayOrder":2
}
}
{
"@type":"MenuItemOffer",
"@id":"menu_1_pasta_spin_ling_offer",
"sku":"6680312",
"menuItemId":"menu_1_pasta_spin_ling",
"price":15.75,
"priceCurrency":"USD"
}