Skip to content

Commit

Permalink
docs: extend environment.ts configuration documentation
Browse files Browse the repository at this point in the history
- add important hybrid approach note

closes:  #770
  • Loading branch information
shauke committed Aug 4, 2021
1 parent 87c86cc commit 4ca29d6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
21 changes: 21 additions & 0 deletions docs/concepts/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,27 @@ For instance, there is no general distinction between B2B and B2C applications.
Each setup can define specific features at any time.
Of course, the ICM server must supply appropriate REST resources to leverage functionality.

### Available Feature Toggles

| feature toggle | description of enabled feature |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| compare | product compare feature (additional configuration via `dataRetention` configuration options) |
| rating | display product ratings |
| recently | display recently viewed products (additional configuration via `dataRetention` configuration options) |
| **B2B Features** | |
| advancedVariationHandling | handle product variations as individual products in listings and product detail pages |
| businessCustomerRegistration | create business customers on registration |
| orderTemplates | order templates feature |
| quickorder | quick order page and direct add to cart input |
| quoting | quoting feature |
| **B2C Features** | |
| guestCheckout | allow unregistered guest checkout |
| wishlists | wishlist product list feature |
| **Third-party Integrations** | |
| sentry | Sentry error tracking and monitoring (additional configuration via `sentryDSN`) |
| tacton | Tacton product configuration integration (additional configuration via `tacton` and `dataRetention` configuration options) |
| tracking | Google Tag Manager tracking (additional configuration via `gtmToken`) |

### Configuring Features

The configuration of features can be done statically by the Angular CLI environment property `features` (string array) or the environment parameter `FEATURES` (comma-separated string list).
Expand Down
2 changes: 2 additions & 0 deletions docs/concepts/hybrid-approach.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ A possible scenario would be to have the shopping experience with all its SEO op
- ICM 7.10.16.6
- PWA 0.18

> **NOTE:** The feature is based on the assumption that the PWA and the ICM can read and write each other's cookies. That means that both cookies must have the same domain and the same path. Therefore, the feature only works if the PWA and the ICM are running in the same domain.
## Architectural Concept

![Hybrid Approach Architecture](hybrid-approach-architecture.svg)
Expand Down
11 changes: 5 additions & 6 deletions src/environments/environment.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ import { TactonConfig } from '../app/extensions/tacton/models/tacton-config/tact

export interface Environment {
/* INTERSHOP COMMERCE MANAGEMENT REST API CONFIGURATION */

icmBaseURL: string;
icmServer: string;
icmServerStatic: string;

// temporarily hard-coded identity provider ID, later supplied by configurations call
identityProvider: 'ICM' | string;

// application specific
icmChannel: string;
icmApplication?: string;

// array of REST path expressions that should always be mocked
apiMockPaths?: string[];

// temporarily hard-coded identity provider ID, later supplied by configurations call
identityProvider: 'ICM' | string;

/* FEATURE TOGGLES */
features: (
| 'compare'
Expand Down Expand Up @@ -81,6 +78,7 @@ export interface Environment {
// default device type used for initial page responses
defaultDeviceType: DeviceType;

// default locale that is used as fallback if no default locale from the ICM REST call is available
defaultLocale?: string;

// configuration filtering available locales and their active currencies
Expand All @@ -107,6 +105,7 @@ export interface Environment {
| Auth0Config;
};

// enable and configure data persistence for specific stores (compare, recently, tacton)
dataRetention: DataRetentionPolicy;
}

Expand Down

0 comments on commit 4ca29d6

Please sign in to comment.