Bloomreach Spartacus Library
The Bloomreach Spartacus Library enables Bloomreach Content and Discovery capabilities with Spartacus.
The Bloomreach Spartacus Library interacts with the following:
Components
- Category highlight
- Pathways & Recommendations
- Spartacus banner
- Spartacus paragraph
- Spartacus product carousel
- Spartacus product details
- Spartacus product list
- Banner
- Spartacus breadcrumb
- Spartacus cart coupon
- Spartacus cart details
- Spartacus cart quick order form
- Spartacus cart totals
- Spartacus checkout order summary
- Spartacus checkout progress
- Spartacus checkout progress mobile bottom
- Spartacus checkout progress mobile top
- Spartacus checkout review order
- Spartacus delivery mode
- Spartacus forget password
- Spartacus login
- Spartacus login register
- Spartacus mini cart
- Spartacus order confirmation items
- Spartacus order confirmation totals
- Spartacus order confirmation overview
- Spartacus order confirmation thank you message
- Spartacus payment method
- Spartacus place order
- Spartacus product facet navigation
- Spartacus register
- Spartacus search box
- Spartacus shipping address
- Spartacus user greet
- Spartacus wish list
- User my account
Getting Started
Prerequisites
Your Angular development environment should include the following:
- Angular CLI: Version 12.2.x or later.
- Node.js: The most recent 12.14.x or later.
- Yarn: Version 1.15 or later / npm: Version 6.x or later
Install dependencies and start
Before starting the SPA,
- Configure the environemnt variables as here
- Set the Spartacus OCC config in src/app/spartacus/spartacus-configuration.module.ts as here
In the root directory of your project run the following commands using NPM:
npm ci
npm start
Or with Yarn (Recommended):
yarn
yarn start
Environment variables
The Enviroment Variables are to be configured as follows:
Property | Required | Description |
---|
endpoint | yes | The Bloomreach Content endpoint. |
smEndPoint | yes | The Bloomreach Discovery endpoint. |
smSuggestionEndPoint | yes | The Bloomreach Discovery Suggestion endpoint. |
accountId | yes | The Bloomreach Discovery account ID. |
domainKey | yes | The Bloomreach Discovery domain key. |
authKey | yes | The Bloomreach Discovery auth key. |
defaultLoadingTime | yes | Default spinner loading time. |
Example
export const environment = {
production: true,
libConfig: {
endpoint: 'https://...../pages',
smEndPoint: 'https://....',
smSuggestionEndPoint: 'https://suggest.xyzz.com/api/',
accountId : "1234",
domainKey : "abc_123",
authKey : "etdr235dfh"
},
appConfig: {
defaultLoadingTime: 2
}
};
Info
- Know more about Bloomreach SAP Spartacus here
- The environment variables must be configured at build time since Angular not support configuring them in runtime from hosting provider.
License
Published under Apache 2.0 license.