projects/congarevenuecloud/elements/src/lib/product-configuration/services/product-configuration.service.ts
Product configuration are a complex feature when configuring products with option groups and attribute groups based on business logic.
Properties |
Methods |
constructor(primaryCartService: CartService, secondaryCartService: SecondaryCartService, storefrontService: StorefrontService, crMessageService: ConstraintRuleMessageService, araiService: AppliedRuleActionInfoService)
|
||||||||||||||||||
Parameters :
|
changeProductQuantity | ||||||||||||
changeProductQuantity(qty: number, item?: CartItem)
|
||||||||||||
This method accepts and stores the quantity of the primary product in its local state. Example:Example :
Parameters :
Returns :
Observable<CartActionResponse>
|
getPrimaryItem | ||||||||
getPrimaryItem(product: Product)
|
||||||||
The method is responsible for fetching the primary lineitem of the product. Example:Example :
Parameters :
Returns :
CartItem
an instance of cartItem object. |
onChangeConfiguration | ||||||||
onChangeConfiguration(configuration: ConfigurationState)
|
||||||||
The method is responsible to emit the latest configuration state. Example:Example :
Parameters :
Returns :
void
|
configurationChange |
Type : BehaviorSubject<ConfigurationState>
|
Default value : new BehaviorSubject({} as ConfigurationState)
|
Behavior subject emits the configuration state change. |
isDiscovery |
Type : BehaviorSubject<boolean>
|
Default value : new BehaviorSubject(false)
|
parentPrimaryLineNumber |
Type : number
|
Default value : 0
|
primaryTxnLineNumber |
Type : number
|
Default value : 0
|
Public productQuantity |
Type : number
|
Default value : 1
|
stores the quantity of the primary product |