EntityViewサンプル – 注文の概要

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Ordersプラグインによって提供される、追加されたプロパティ:

OrderConfirmationId<=order.OrderConfirmationId
OrderPlacedDate<=order.OrderPlacedDate
DateUpdated<=order.DateUpdated
Status<=order.Status
PaymentStatus<=order.PaymentStatus
ShopName<=order.ShopName
CustomerEmail<=order.GetComponent<ContactComponent>().Email
OrderSubTotal<=order.Totals.SubTotal
OrderAdjustmentsTotal<=order.Totals.AdjustmentsTotal
OrderGrandTotal<=order.Totals.GrandTotal
OrderPaymentsTotal<=order.Totals.PaymentsTotal

GiftCardsプラグインによって提供され、たとえば、注文にギフトカードの購入が含まれる場合:

GiftCardPurchased<=line.GetComponent<GiftCardComponent>().GiftCardCode
GiftCardAmount<=line.GetComponent<GiftCardComponent>().GiftCardAmount

AdventureWorksプラグインによって提供されます。これは、注文でクーポンを使用するカスタマイズの例です。

CouponUsed<=line.GetComponent<CartCouponsComponent>().Name

EntityViewを取得するためのサンプル呼び出し:

http://{{ServiceHost}}/{{ShopsApi}}/GetEntityView()

体:

{
    "entityId":"{006fa25e-d3ca-4e05-97fb-55afd8568e2e}",
    "viewName":"Summary",
    "forAction":""
}

通話結果の例:

{
  "@odata.context": "http://localhost:5000/Api/$metadata#Sitecore.Commerce.EntityViews.EntityView",
  "@odata.type": "#Sitecore.Commerce.EntityViews.EntityView",
  "Name": "Summary",
  "Policies": [],
  "DisplayName": "Summary",
  "EntityId": "{006fa25e-d3ca-4e05-97fb-55afd8568e2e}",
  "Action": "",
  "ItemId": "",
  "Properties": [
    {
      "Name": "OrderConfirmationId",
      "Policies": [],
      "DisplayName": "Order Confirmation Id",
      "Value": "{006fa25e-d3ca-4e05-97fb-55afd8568e2e}",
      "IsHidden": false,
      "OriginalType": "String",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "OrderPlacedDate",
      "Policies": [],
      "DisplayName": "Placed Date",
      "Value": "8/19/2016 9:52:02 PM",
      "IsHidden": false,
      "OriginalType": "DateTime",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "DateUpdated",
      "Policies": [],
      "DisplayName": "Date Updated",
      "Value": "8/19/2016 9:52:09 PM",
      "IsHidden": false,
      "OriginalType": "DateTime",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "Status",
      "Policies": [],
      "DisplayName": "Status",
      "Value": "Completed",
      "IsHidden": false,
      "OriginalType": "String",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "PaymentStatus",
      "Policies": [],
      "DisplayName": "Payment Status",
      "Value": "Paid",
      "IsHidden": false,
      "OriginalType": "String",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "ShopName",
      "Policies": [],
      "DisplayName": "Shop Name",
      "Value": "Storefront",
      "IsHidden": false,
      "OriginalType": "String",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "CustomerEmail",
      "Policies": [],
      "DisplayName": "Customer Email",
      "Value": "[email protected]",
      "IsHidden": false,
      "OriginalType": "String",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "OrderSubTotal",
      "Policies": [],
      "DisplayName": "Order Sub Total",
      "Value": "USD940.00",
      "IsHidden": false,
      "OriginalType": "Money",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "OrderAdjustmentsTotal",
      "Policies": [],
      "DisplayName": "Order Adjustments Total",
      "Value": "USD94.00",
      "IsHidden": false,
      "OriginalType": "Money",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "OrderGrandTotal",
      "Policies": [],
      "DisplayName": "Order Grand Total",
      "Value": "USD1,034.00",
      "IsHidden": false,
      "OriginalType": "Money",
      "IsReadOnly": true,
      "UiType": ""
    },
    {
      "Name": "OrderPaymentsTotal",
      "Policies": [],
      "DisplayName": "Order Payments Total",
      "Value": "USD413.60",
      "IsHidden": false,
      "OriginalType": "Money",
      "IsReadOnly": true,
      "UiType": ""
    }
  ],
  "ChildViews": [],
  "DisplayRank": 500,
  "UiHint": "Flat"
}
この記事を改善するための提案がある場合は、 お知らせください!