GitHub

ShopifyCart

Type

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

A cart represents the merchandise that a buyer intends to purchase, and the estimated cost associated with the cart, throughout a customer's session.

Use the checkoutUrl field to direct buyers to Shopify's web checkout to complete their purchase.

Learn more about interacting with carts.

interface ShopifyCart {
  __typename: "Cart"
  appliedGiftCards: ShopifyAppliedGiftCard[]
  attribute: ShopifyAttribute
  attributes: ShopifyAttribute[]
  buyerIdentity: ShopifyCartBuyerIdentity
  checkoutUrl: Scalars['URL']['output']
  cost: ShopifyCartCost
  createdAt: Scalars['DateTime']['output']
  delivery: ShopifyCartDelivery
  deliveryGroups: ShopifyCartDeliveryGroupConnection
  discountAllocations: ShopifyCartDiscountAllocation[]
  discountCodes: ShopifyCartDiscountCode[]
  estimatedCost: ShopifyCartEstimatedCost
  id: string
  lines: ShopifyBaseCartLineConnection
  metafield: ShopifyMetafield
  metafields: ShopifyMetafield[]
  note: string
  totalQuantity: number
  updatedAt: Scalars['DateTime']['output']
}

Properties

__typename
"Cart"
appliedGiftCards
ShopifyAppliedGiftCard[]

The gift cards that have been applied to the cart.

attribute
ShopifyAttribute

An attribute associated with the cart.

attributes
ShopifyAttribute[]

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

buyerIdentity
ShopifyCartBuyerIdentity

Information about the buyer that's interacting with the cart.

checkoutUrl
Scalars['URL']['output']

The URL of the checkout for the cart.

cost
ShopifyCartCost

The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The cost field uses the buyerIdentity field to determine international pricing.

createdAt
Scalars['DateTime']['output']

The date and time when the cart was created.

delivery
ShopifyCartDelivery

The delivery properties of the cart.

deliveryGroups
ShopifyCartDeliveryGroupConnection

The delivery groups available for the cart, based on the buyer identity default delivery address preference or the default address of the logged-in customer.

discountAllocations
ShopifyCartDiscountAllocation[]

The discounts that have been applied to the entire cart.

discountCodes
ShopifyCartDiscountCode[]

The case-insensitive discount codes that the customer added at checkout.

estimatedCost
ShopifyCartEstimatedCost

The estimated costs that the buyer will pay at checkout. The estimated costs are subject to change and changes will be reflected at checkout. The estimatedCost field uses the buyerIdentity field to determine international pricing.

id
string

A globally-unique ID.

lines
ShopifyBaseCartLineConnection

A list of lines containing information about the items the customer intends to purchase.

metafield
ShopifyMetafield

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

metafields
ShopifyMetafield[]

A list of custom fields that a merchant associates with a Shopify resource.

note
string

A note that's associated with the cart. For example, the note can be a personalized message to the buyer.

totalQuantity
number

The total number of items in the cart.

updatedAt
Scalars['DateTime']['output']

The date and time when the cart was updated.