GitHub

ShopifyCartLine

Type

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

An item in a customer's Cart representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts.

Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a SellingPlanAllocation for purchase options like subscriptions, pre-orders, or try-before-you-buy. The instructions field indicates whether the line can be removed or have its quantity updated.

interface ShopifyCartLine {
  __typename: "CartLine"
  attribute: ShopifyAttribute
  attributes: ShopifyAttribute[]
  cost: ShopifyCartLineCost
  discountAllocations: ShopifyCartDiscountAllocation[]
  estimatedCost: ShopifyCartLineEstimatedCost
  id: string
  merchandise: ShopifyProductVariant
  quantity: number
  sellingPlanAllocation: ShopifySellingPlanAllocation
}

Properties

__typename
"CartLine"
attribute
ShopifyAttribute

An attribute associated with the cart line.

attributes
ShopifyAttribute[]

The attributes associated with the cart line. Attributes are represented as key-value pairs.

cost
ShopifyCartLineCost

The cost of the merchandise that the buyer will pay for at checkout. The costs are subject to change and changes will be reflected at checkout.

discountAllocations
ShopifyCartDiscountAllocation[]

The discounts that have been applied to the cart line.

estimatedCost
ShopifyCartLineEstimatedCost

The estimated cost of the merchandise that the buyer will pay for at checkout. The estimated costs are subject to change and changes will be reflected at checkout.

id
string

A globally-unique ID.

merchandise
ShopifyProductVariant

The merchandise that the buyer intends to purchase.

quantity
number

The quantity of the merchandise that the customer intends to purchase.

sellingPlanAllocation
ShopifySellingPlanAllocation

The selling plan associated with the cart line and the effect that each selling plan has on variants when they're purchased.