Cart initialization
The cart drop-in component initializer provides options for configuring language definitions and extending the default models with new fields and transformers.
Configuration options
The cart component initializer accepts the following configuration options:
Example
The following code shows an example implementation of the cart initializer configuration:
Set language definitions
The langDefinitions
property registers the cart component dictionary files, which are used for internationalization purposes. These files allow you to provide localized text for different languages in your application.
Set models
You can extend the default models in the cart component and provide transformers to process new fields.
The models
property is an object that contains the default models that you might want to extend and the transformers to use to transform the data. By default, the cart component initializer only accepts the CartModel
.
The following example shows how to extend the default models with new fields and transformers: