Ravak Configurator
    Preparing search index...

    Type Alias CheckoutItemAmountsCallback

    CheckoutItemAmountsCallback: (
        context: {
            configurator: Configurator;
            demandItems: DemandItemAPIModel[];
            selectedOptions: ParameterOptions;
        },
    ) => false
    | Promise<false>
    | unknown

    Function that is called during checkout process after the user decided how many items they want, before displaying the contact details form.

    Return false to prevent displaying the contact details form.

    This function can be asynchronous (it will be awaited), but does not have to be.

    Type declaration

      function handleCheckoutItemAmounts(context) {
    for (const item of context.demandItems) {
    for (const product of item.definition.product_variants) {
    Shop.addProductToCart({
    id: product.identifier,
    count: item.amount * product.amount,
    });
    }
    }
    Shop.showToast('Products added to your cart.');
    return false;
    }