GitHub

ShopifyCartLineCost

Type

import { ShopifyCartLineCost } from '@daffodil/driver/shopify'

Cost breakdown for a single line item in a cart. Includes the per-unit price, the subtotal before line-level discounts, and the final total amount the buyer pays.

The compareAtAmountPerQuantity field shows the original price when the item is on sale, enabling the display of savings to customers.

interface ShopifyCartLineCost {
  __typename: "CartLineCost"
  amountPerQuantity: ShopifyMoneyV2
  compareAtAmountPerQuantity: ShopifyMoneyV2
  subtotalAmount: ShopifyMoneyV2
  totalAmount: ShopifyMoneyV2
}

Properties

__typename
"CartLineCost"
amountPerQuantity
ShopifyMoneyV2

The amount of the merchandise line.

compareAtAmountPerQuantity
ShopifyMoneyV2

The compare at amount of the merchandise line.

subtotalAmount
ShopifyMoneyV2

The cost of the merchandise line before line-level discounts.

totalAmount
ShopifyMoneyV2

The total cost of the merchandise line.