selectComment$(): Observable<string>¶
The selectComment$
method allows to select the text from Comments to order
field.
Returned value¶
A returned value has a type of Observable<string>
representing a current comment.
Example¶
In this example we make a basketOverallApi
call to select a current comment for the order.
useStorefront(async (storefront) => {
const basketOverallApi = storefront.getApiSync('basketOverallApi');
const comment$ = basketOverallApi.selectComment$();
comment$.subscribe((comment) => {
console.log('current comment: '. comment);
});
});
Basket Overall API methods reference¶
- getActions
- selectActions$
- getId
- selectId$
- getComment
- getIsVatEu
- selectIsVatEu$
- getDelivery
- selectDelivery$
- getSum
- selectSum$
- getSumWithoutPaymentAndShipping
- selectSumWithoutPaymentAndShipping$
- cleanBasket
- setComment
- getInvalidSections
- selectInvalidSections$
- getSectionValidation
- selectSectionValidation$