getDelivery(): Delivery¶
The getDelivery
method allows to retrieve an object containing information about a chosen delivery method of a current basket.
Returned value¶
A returned value has a type of Delivery
which represents a Delivery model.
Example¶
In this example we make a basketOverallApi
call to retrieve a current delivery method.
useStorefront(async (storefront) => {
const basketOverallApi = storefront.getApiSync('basketOverallApi');
const delivery = basketOverallApi.getDelivery();
console.log('current delivery:'. delivery.name);
});
Basket Overall API methods reference¶
- getActions
- selectActions$
- getId
- selectId$
- getComment
- selectComment$
- getIsVatEu
- selectIsVatEu$
- selectDelivery$
- getSum
- selectSum$
- getSumWithoutPaymentAndShipping
- selectSumWithoutPaymentAndShipping$
- cleanBasket
- setComment
- getInvalidSections
- selectInvalidSections$
- getSectionValidation
- selectSectionValidation$