Skip to content

getSumWithoutPaymentAndShipping(): FullPrice

The getSumWithoutPaymentAndShipping method allows to retrieve information about a total sum of products in the current basket excluding payment method and shipping costs.

Returned value

A returned value has a type of FullPrice which represents a FullPrice model.

Example

In this example we make a basketOverallApi call to retrieve a total sum of products in the basket without costs regarding the payment method and shipping.

useStorefront(async (storefront) => {
    const basketOverallApi = storefront.getApiSync('basketOverallApi');

    const sumWithoutPaymentAndShipping = basketOverallApi.getSumWithoutPaymentAndShipping();

    console.log('current sum without payment and shipping:'. sumWithoutPaymentAndShipping.grossValueFormatted);
});

Basket Overall API methods reference

Models reference