菜单实体

Menu 实体定义了菜单项、优惠和菜单等属性 部分。

定义 Menu 实体时,请使用 Menu 类型。

<ph type="x-smartling-placeholder">
</ph> 菜单实体关系图
图 1:显示其与以下项的关系的菜单实体 MenuSection、Availability、MenuItem、MenuItemOption 和 MenuItemOffer。

使用 MenuSectionMenuItem 对象整理为逻辑类别。这种方法适用于 有多个菜单例如,一家餐馆可能针对不同需求提供不同的菜单 早餐、午餐和晚餐。每个菜单都可以作为单独的 MenuSection 添加。

每个菜单项都可以包含说明、图片、插件和营养成分 信息。Offer 用于为菜单项设定价格,定义何时 商品是否有货,并定义特价有效期。以 Menu 实体应该会随着每次数据 Feed 上传而发生变化和刷新。

以下示例定义了一个具有两个不同菜单的基本 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"
}