showAdvancedConsentsModal(): void¶
The showAdvancedConsentsModal
method allows to show the advanced consent modal allowing to grant or withdraw chosen only selected consents by the user.
Input parameters¶
none
Returned value¶
A returned value has a type of void
as this method does not return anything.
Event Bus events¶
This API method dispatches the following events with the Event Bus:
- consentsService.showAdvancedConsentsModal - when showing a modal
Example¶
In this example we make a customerPrivacyApi
call to show the advanced consent modal.
useStorefront((storefront) => {
const customerPrivacyApi = await storefront.getApi('customerPrivacyApi');
customerPrivacyApi.showAdvancedConsentsModal();
});