GitHub

DaffCartItemInput

A set of fields specifying how to add a product to the cart.

import { DaffCartItemInput } from '@daffodil/cart'
interface DaffCartItemInput {
  type: DaffCartItemInputType
  productId: DaffProduct['id']
  qty: number
}

Properties

Name Type Description
type DaffCartItemInputType

The type of cart item that corresponds to the product being added to the cart.

productId DaffProduct['id']

The ID of the product to add to the cart.

qty number

How many of the product should be added to the cart.