GitHub

DaffProduct

import { DaffProduct } from '@daffodil/product'

An interface for a product usable by the @daffodil/product library.

interface DaffProduct {
  type: DaffProductTypeEnum
  name: string
  thumbnail: DaffProductImage
  images: DaffProductImage[]
  price: number
  discount: DaffProductDiscount
  in_stock: boolean
  brand: string
  description: string
  short_description: string
  meta_title: string
  meta_description: string
}

Properties

type
DaffProductTypeEnum

The type of product.

name
string

The product name.

thumbnail
DaffProductImage

An image to concisely visualize the product.

images
DaffProductImage[]

An array of images for the product.

price
number

The price of the product.

discount
DaffProductDiscount

The total discounts associated with this product.

in_stock
boolean

Whether or not the product is in stock.

brand
string

The product brand.

description
string

Describes the product.

short_description
string

A shorter description of the product.

meta_title
string

A title for the product to display in the browser tab title.

meta_description
string

A description of the product for usage in search engine results.