selectSkinSettings$(): Observable<TSkinSettings>¶
The selectSkinSettings$
method allows you to get an observable with settings of a currently active skin in the shop.
Returned value¶
A returned value has a type of Observable<TSkinSettings>
where TSkinSettings
is the TSkinSettings object.
Example¶
In this example we make a StorefrontSettingsApi
call to get an observable with settings of a currently active skin.
useStorefront(async (storefront) => {
const storefrontSettingsApi = storefront.getApiSync('StorefrontSettingsApi');
const skinSettings$ = storefrontSettingsApi.selectSkinSettings$();
skinSettings$.subscribe((skinSettings) => {
if (skinSettings$.isBuyingEnabledToUnregistered) {
// do something
}
});
});
Storefront Settings API methods reference¶
- getSkinSettings
- getPageSettings
- selectPageSettings$
- selectFrontstoreApiUrl$
- getLocales
- selectLocales$
- getCountries
- selectCountries$
- getCountryById
- selectCountryById$
- getCountryByCode
- selectCountryByCode$