projects/congarevenuecloud/elements/src/lib/constraint-rule/services/constraint-rule-message.service.ts
Service is responsible to build and format the constraint rule messages to render on the view.
Properties |
Methods |
constructor(constraintRuleService: ConstraintRuleService, productService: ProductService, exceptionService: ExceptionService, primaryCartService: CartService, secondaryCartService: SecondaryCartService, araiService: AppliedRuleActionInfoService, productOptionService: ProductOptionService)
|
||||||||||||||||||||||||
Parameters :
|
addProductToCartFromRule | ||||||||||||||||||||
addProductToCartFromRule(ruleDetail: ConstraintRuleDetail | AppliedRuleActionInfo, product: Product, quantity: number)
|
||||||||||||||||||||
Adds a product to the cart based on the associated constraint rule.
Parameters :
Returns :
Observable<void>
|
deleteProductFromCart | ||||||||||||
deleteProductFromCart(ruleDetail: ConstraintRuleDetail | AppliedRuleActionInfo, product: Product)
|
||||||||||||
Removes a product from the cart based on the given constraint rule detail object.
Parameters :
Returns :
Observable<string>
|
getCartRuleGroups |
getCartRuleGroups()
|
Returns an observable of the cart level rule groups.
Returns :
Observable<ConstraintRuleGroups>
|
refreshCartRules |
refreshCartRules()
|
Refreshes the cart level constraint rules behavior subject.
Returns :
Observable<ConstraintRuleGroups>
|
refreshConfigRules |
refreshConfigRules()
|
Refreshes the product configuration level constraint rules behavior subject.
Returns :
any
|
cartRuleGroups$ |
Type : BehaviorSubject<ConstraintRuleGroups>
|
Default value : new BehaviorSubject<ConstraintRuleGroups>(null)
|
Groups of cart level constraint rules. |
showRules$ |
Type : BehaviorSubject<boolean>
|
Default value : new BehaviorSubject<boolean>(true)
|