Usage

import { getStoreProducts } from "@slicekit/core"

const { cartProducts, storeClosed } = await getStoreProducts({
  slicerId,
  buyer,
  isOnsite,
  isDelivery
})

Parameters

slicerId
number
required
ID of the slicer to get products from.
buyer
`0x${string}` | undefined
Address of the buyer, used to determine eventual discounts. If not provided, base prices are returned.
isOnsite
boolean
Set to true to return products that are available for onsite purchases.
isDelivery
boolean
Set to true to return products that are available for online purchases.

Return Type

cartProducts
ProductCart[]
List of products available in the store.
storeClosed
boolean
States determining if the store is not accepting purchases.