Type Alias SingleAddToCartHandler

SingleAddToCartHandler: {
    single: ((articleNumber: string, quantity: number, configurationId?: string) => Promise<boolean>);
}

Handler for adding a single item to the cart.

Type declaration

  • single: ((articleNumber: string, quantity: number, configurationId?: string) => Promise<boolean>)

    Adds a single item to the cart.

      • (articleNumber, quantity, configurationId?): Promise<boolean>
      • Parameters

        • articleNumber: string

          The article number of the product to add.

        • quantity: number

          The quantity of the product to add.

        • OptionalconfigurationId: string

          The configuration ID of the product to add, if not provided this is an up-selling and not a custom made product.

        Returns Promise<boolean>

        A promise that resolves to true if the item was successfully added, false otherwise.