AppContext
This article provides reference material about the AppContext.
The AppContext provides the following information:
| Property | Type | Description |
|---|---|---|
| language | Language | Information about the current language. |
| user | User | Information about the current user. |
| offlineMode | boolean | Indicates whether shop is currently in the maintenance mode. |
The Language type contains following properties:
| Property | Type | Description |
|---|---|---|
| id | number | null | Current language ID (e.g. 1033) |
| cultureName | string | null | Current language culture name (e.g. 'en-US'). |
The User type contains following properties:
| Property | Type | Description |
|---|---|---|
| isAuthenticated | boolean | Indicates whether user is authenticated. |
| currencyId | string | null | Customer currency ID. |
| shopAccountId | string | null | Shop account identifier. |
| shopAccountType | 'CUSTOMER' | 'CONTACT' | 'SALES_AGENT' | null | Shop account type. |
| string | null | Shop account e-mail. | |
| name | string | null | Shop account name. |
| companyName | string | null | Customer name or null if the user is a B2C customer. |
| phone | string | null | Customer phone number. |
| isImpersonating | boolean | Indicates if user is impersonating a customer or a contact. |
| canViewCatalog | boolean | Indicates whether the user can view catalog. |
| canViewPrices | boolean | Indicates whether the user can view prices. |
| canViewStock | boolean | Indicates whether the user can view stock. |
| canViewUnitOfMeasure | boolean | Indicates whether the user can view product unit or measure. |
| canOrderProducts | boolean | Indicates whether the user can order products. |