GitHub

DaffCartItem

import { DaffCartItem } from '@daffodil/cart'

A cart item. Cart item types correspond to product types. They hold information about the product to which they correspond and how many of said product is in the cart.

interface DaffCartItem {
  type: DaffCartItemInputType
  image: DaffProductImage
  product_id: string
  parent_item_id: string
  sku: string
  name: string
  qty: number
  price: number
  row_total: number
  in_stock: boolean
  discounts: DaffCartItemDiscount[]
}

Properties

type
DaffCartItemInputType

The type of cart item.

image
DaffProductImage

The image or thumbnail of the corresponding product.

product_id
string

The ID of the corresponding product.

parent_item_id
string
sku
string
name
string

A human-readable label.

qty
number

How many of the corresponding product is in the cart.

price
number

The price per item, excluding cart discounts. This includes any discounts and sales that apply to the product or category.

row_total
number

The total for the entire row, not including cart discounts. This includes any discounts and sales that apply to the product or category.

in_stock
boolean

Whether or not the specified quantity of the corresponding product is in stock.

discounts
DaffCartItemDiscount[]

A list of discounts applied to the cart item row.